<div dir="ltr"><div>Back at it again...</div><div><br></div><div>I'm using a Brazil georeferenced map, so I know what coordinates are good enough to be above the country, high enough to see it all, looking down:</div><div><br></div><div>(...)<br></div><div>    osgViewer::Viewer viewer;<br>    viewer.setSceneData( root.get() );<br>    osg::ref_ptr<OVNIController> controller = new OVNIController(&viewer); // my own WASD flying controller<br>    viewer.setCameraManipulator(controller);<br>    viewer.getCamera()->setViewMatrixAsLookAt( osg::Vec3(-55.0f,-15.0f,50.0f), osg::Vec3(), osg::Y_AXIS ); // eye (lon, lat, alt), center, up<br>    viewer.getCameraManipulator()->home(1);<br>    viewer.realize();<br>    while ( !viewer.done() ) { viewer.frame(); }<br>    return 0;<br><br></div><div>I don't know if setViewMatrixAsLookAt() and home() should go before or after realize(). Played with the axis as 3rd parameter for setViewMatrixAsLookAt, but the camera just won't move! Any help, please?<br></div><div><br></div><br>On Tuesday, January 8, 2019 at 1:39:53 AM UTC-2, sam wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div>After you set the home position try: viewer.getCameraManipulator()-<wbr>>home(1); <br></div><div><br></div><div>Sorry I'm not right in front of my computer right now.</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 7, 2019 at 7:26 PM Rodrigo Dias <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="FPTU4veSEQAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">rodri...@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Sam,<br>
<br>
By "home" I think you mean<br>
<br>
<br>
Code:<br>
viewer.getCameraManipulator()-<wbr>>setHomePosition( eye, center, up );<br>
<br>
<br>
<br>
<br>
This really changed camera's position, though it's totally freaking out now (I'm still fiddling with the values in eye, center and up).<br>
<br>
But I have no idea what you meant by "delta time", something to go inside the loop?<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Rodrigo<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=75413#75413" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75413%2375413\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1c-pcAOa1j_ACzb1R7TkQjRsewg';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fforum.openscenegraph.org%2Fviewtopic.php%3Fp%3D75413%2375413\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG1c-pcAOa1j_ACzb1R7TkQjRsewg';return true;">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=75413#<wbr>75413</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="FPTU4veSEQAJ" 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" rel="nofollow" target="_blank" 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>
</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/9bf0c1bb-6a74-4050-b6a5-6e99b2eac70f%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/9bf0c1bb-6a74-4050-b6a5-6e99b2eac70f%40googlegroups.com</a>.<br />