piotr.karkocha Posted December 12, 2018 Share Posted December 12, 2018 Hi! I am trying to update Superposition's ObjTooltip to work inside the VR Template. Before doing so, I also have to make some changes to the Tooltips.h /Tooltips.cpp, but I am stuck at one point. Here is the code I have slightly changed: #pragma once #include <UnigineNodes.h> #include <UnigineVector.h> #include <UnigineMap.h> #include "ObjTooltip.h" #include "../Players/VRPlayer.h" using namespace Unigine; using namespace Math; class Tooltips { public: static Tooltips& get() { static Tooltips instance; return instance; } static void hide(const char * event_name); void init(const Map<int, Vector<VRInteractable*>> *objs); void update(); void setEnabled(int enabled, int immediately = 0); int isEnabled(); void setPlayer(VRPlayer* player); vec3 getHeadPos(); // for PC / VR vec3 getHeadDir(); private: Tooltips() {} ~Tooltips() {} Tooltips(Tooltips const&) = delete; Tooltips& operator= (Tooltips const&) = delete; int is_enabled = 1; Vector<const char*> used_events; // activated events Vector<ObjTooltip*> tooltips; // all tooltips in world // head position vec3 head_pos; vec3 head_dir; VRPlayer* player; }; I'm getting errors with the constructor/destructor: Tooltips() {} ~Tooltips() {} (no apropriate constructor available) And at Vector<ObjTooltip*> tooltips; (undeclared Identifier - but in the api it gets highlighted as if it were right) Could you please help me on it? Thanks! Link to comment
silent Posted December 14, 2018 Share Posted December 14, 2018 Hi Piotr, Superposition logic was made before component system even existed, so you can't simply copy-paste code from one to another and hope that it would work. Right now we are in the middle of the release update and will be able to take a closer look later, sorry. I will add task for the future releases so we will add stylized tooltips into VR template (already based on the component system). Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
piotr.karkocha Posted December 18, 2018 Author Share Posted December 18, 2018 Hi Silent, I started learning programming recently and still can not understand many concepts in the code, I thought maybe it would not be hard to convert it so that it can be used with VR Template and the Component System, similiar to converting some Superposition's Objs. Thanks, that would be great!:) Link to comment
Recommended Posts