[osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Tue May 12 10:22:43 PDT 2020
Hi Sam,
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).
You can see my code here:
https://github.com/eco-info/osgCookbook/blob/master/outros/terreno1/terreno1.cpp
Best,
Rodrigo.
On Thursday, January 31, 2019 at 12:58:17 PM UTC-2, Sam Brkopac wrote:
>
> Hi Rodrigo,
>
> The Camera::setViewMatrixLookAt function is equivalent to the gluLookAt.
> You can find more documentation on the inner workings here (
> https://stackoverflow.com/questions/21830340/understanding-glmlookat).
>
> 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().
>
> If you have a specific question regarding one of the manipulators, please
> ask.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75575#75575
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-... at lists.openscenegraph.org <javascript:>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/a2bcda58-f475-43a9-936d-343fa281e60a%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200512/ac8a7fd4/attachment.html>
More information about the osg-users
mailing list