jiaxin Posted March 23, 2016 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.
ded Posted March 23, 2016 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; }
Recommended Posts