AddNode resets camera


photo

Recommended Posts

I'm performing a simple mouse intersection test to create a new dummy node and whenever I do, my editor cam is reset somewhere back to 0,0,0. Any idea why this is?
 
int ret[1];
vec3 p0, p1;

Unigine::getPlayerMouseDirection(p0,p1);
Object obj = engine.world.getIntersection(p0, p1, ~0, ret);

NodeDummy pt = new NodeDummy();
pt.setName("TESTNODE");
pt.setWorldPosition(ret[0]);
engine.editor.addNode(pt);

Philip

Link to post