Hello,
I have an osg::Viewer with a regular camera, and now I added a slave camera
to that viewer. The main camera is controlled by a TrackballManipulator.
Now I would like to sync the rotation of both cameras, i.e., when I
manipulate the main camera with the mouse, I want to apply the same
rotation (ROTATION ONLY!) to the slave camera.
This is how I am doing it:
osg::Matrixd mat = osg::Matrixd::identity();
osg::Quat rot = m_mainCamera->getViewMatrix().getRotate();
m_slaveCamera->setViewMatrix(mat.rotate(rot));
But this does not work very well as it introduces some flicker. How should
this be done correctly?
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org