On 14.11.2013 11:32, Trajce Nikolov NICK wrote:
It doesn't look right. What is wrong with this code? Also, there is some
delay (when I don't apply the orientation just for debug), the model when
attached is sort of delayed following the camera. Any hints?
Hi Nick,
I'm just guessing here, but if model is delayed, it probably means that
camera's view matrix wasn't updated yet. If I remember correctly, Viewer
will update its camera by calling cameraManipulator->updateCamera()
somewhere in the update traversal too... so, maybe node callback is
called before updateCamera()? Maybe you could cast camera->getView() to
osg::Viewer::View and then call getViewerBase(), cast it to proper
Viewer and call viewer->getCameraManipulator()->updateCamera() ...
Robert Milharcic
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org