<div dir="ltr"><div><div><div><div><div>Hello,<br><br></div>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.<br></div><br></div>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.<br><br></div>This is how I am doing it:<br><br>    osg::Matrixd mat = osg::Matrixd::identity();<br>    osg::Quat rot = m_mainCamera->getViewMatrix().getRotate();<br><br>    m_slaveCamera->setViewMatrix(mat.rotate(rot));<br><br><br></div>But this does not work very well as it introduces some flicker. How should this be done correctly?<br></div>