jiaxin Posted March 23, 2016 Share Posted March 23, 2016 Hi. my unigine version is sim 2.0, I use WidgetManipulatorTranslator class in my init function, but my code could not work, i could not see any effect, main code as below: Gui gui = engine.getGui(); w = new WidgetManipulatorTranslator(gui); gui.addChild(w, GUI_ALIGN_OVERLAP); w.setTransform(translate(11,11,11)); Thanks. Link to comment
ded Posted March 23, 2016 Share Posted March 23, 2016 Hi, Modelview and projection matrices of the manipulator should be updated each frame. int update() { Player player = engine.game.getPlayer(); if(player != NULL) { manipulator.setModelview(player.getModelview()); manipulator.setProjection(player.getProjection()); } return 1; } Link to comment
jiaxin Posted March 24, 2016 Author Share Posted March 24, 2016 Hi, Yes, this is it, thank you very much! Link to comment
Recommended Posts