<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Rodrigo,</p>
<p>are you sure about the values of your eye point. As you say your map is georeferenced but it is certanly projected. So you should check the projection system used by your map (maybe have a look at <a href="https://epsg.io/?q=Brazil%20kind%3APROJCRS)">https://epsg.io/?q=Brazil%20kind%3APROJCRS)</a>. I think the main problem may be there. Have you tried maybe by opening your map with an modified osgviewer and check what the eye position is by default ?</p>
<p><br /></p>
<p>Cheers,</p>
<p><br /></p>
<p>Christian</p>
<div id="signature"> </div>
<p><br /></p>
<p id="reply-intro">Le 2020-05-12 11:04, OpenSceneGraph Users a écrit :</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div dir="ltr">
<div>Back at it again...</div>
<div> </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> </div>
<div>(...)</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?</div>
<div> </div>
<br />On Tuesday, January 8, 2019 at 1:39:53 AM UTC-2, sam wrote:
<blockquote class="v1gmail_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); </div>
<div> </div>
<div>Sorry I'm not right in front of my computer right now.</div>
</div>
<br />
<div class="v1gmail_quote">
<div dir="ltr">On Mon, Jan 7, 2019 at 7:26 PM Rodrigo Dias <<a href="./#NOP" rel="noreferrer">rodri...@gmail.com</a>> wrote:</div>
<blockquote class="v1gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; 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" target="_blank" rel="noopener noreferrer">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="./#NOP" rel="noreferrer">osg-...@lists.<wbr />openscenegraph.org</a><br /><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank" rel="noopener noreferrer">http://lists.openscenegraph.<wbr />org/listinfo.cgi/osg-users-<wbr />openscenegraph.org</a></blockquote>
</div>
</blockquote>
</div>
<p><br /></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" rel="noreferrer">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" target="_blank" rel="noopener noreferrer">https://groups.google.com/d/msgid/osg-users/9bf0c1bb-6a74-4050-b6a5-6e99b2eac70f%40googlegroups.com</a>.</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br />osg-users mailing list<br /><a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br /><a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank" rel="noopener noreferrer">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a></div>
</blockquote>
</body></html>