<div dir="ltr"><div>Hi Sam,</div><div><br></div><div>I managed to implement my own manipulator (OVNIController, derived from FirstPersonManipulator), but still can't change the camera position (I want to change it in the beginning of the program, and also when the user press the Home key).</div><div><br></div><div>You can see my code here: https://github.com/eco-info/osgCookbook/blob/master/outros/terreno1/terreno1.cpp<br></div><div><br></div><div>Best,</div><div>Rodrigo.<br></div><br>On Thursday, January 31, 2019 at 12:58:17 PM UTC-2, Sam Brkopac wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi Rodrigo,
<br>
<br>The Camera::setViewMatrixLookAt function is equivalent to the gluLookAt. You can find more documentation on the inner workings here (<a href="https://stackoverflow.com/questions/21830340/understanding-glmlookat" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F21830340%2Funderstanding-glmlookat\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFERVznABSxnkf0ogvv5sd3mE0srg';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F21830340%2Funderstanding-glmlookat\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFERVznABSxnkf0ogvv5sd3mE0srg';return true;">https://stackoverflow.com/<wbr>questions/21830340/<wbr>understanding-glmlookat</a>).
<br>
<br>If you don't set a camera manipulator prior to viewer.run() and move the camera the results will be lost due to viewer.run() setting up its own manipulator and overriding your initial setup. You have a few options: assign the camera manipulator -> update the manipulator -> call home(1) to force an update. Don't call viewer.run() and implement the loop yourself (this will prevent a manipulator from getting set and allowing you to freely manually manipulate the camera). Implement your own manipulator and set it before you call viewer.run().
<br>
<br>If you have a specific question regarding one of the manipulators, please ask.
<br>
<br>------------------
<br>Read this topic online here:
<br><a href="http://forum.openscenegraph.org/viewtopic.php?p=75575#75575" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75575%2375575\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGQLnFkJGusAeTUeHt7Meca5dAMDA';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75575%2375575\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGQLnFkJGusAeTUeHt7Meca5dAMDA';return true;">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=75575#<wbr>75575</a>
<br>
<br>
<br>
<br>
<br>
<br>______________________________<wbr>_________________
<br>osg-users mailing list
<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="mParHm9zGAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">osg-...@lists.<wbr>openscenegraph.org</a>
<br><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a>
<br></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/a2bcda58-f475-43a9-936d-343fa281e60a%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/a2bcda58-f475-43a9-936d-343fa281e60a%40googlegroups.com</a>.<br />