[osg-users] [forum] Change the position and rotation angle of the camera
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Tue May 12 10:19:02 PDT 2020
Dear Robert,
this doesn't answer the question. Most of us use a manipulator, so the
question is: how to change camera position using a
CameraManipulator. Is this possible?
Rodrigo.
On Thursday, April 17, 2014 at 5:22:32 AM UTC-3, Robert Osfield wrote:
>
> Hi Becky,
>
> If you viewer has a CameraManipulator attached to it he manipulator
> will keep overriding the matrix you set on each frame, simply don't
> assigned a CameraManipulator and you should be fine.
>
> Robert.
>
> On 1 April 2014 10:37, ying song <ying... at epfl.ch <javascript:>> wrote:
> > Hi,
> >
> > I draw a box using addDrawable. Then I want to change the position and
> rotation angle of the camera by:
> >
> > viewer->getCamera()->setViewMatrix(cameraTranslationMatrix);
> >
> > But actually it makes no change to the camera. The cube is still in the
> center of the screen after run the scene.
> >
> > I also tried to update the frame by using the following code, but also
> failed:
> >
> > while(!viewer->done())
> > {
> > viewer->getCamera()->setViewMatrixAsLookAt(eye,center,up);
> > viewer->frame();
> > }
> >
> >
> > Would anyone tell me what could I do to move the camera?
> >
> > Thank you!
> >
> > Cheers,
> > Becky
> >
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=58769#58769
> >
> >
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-... at lists.openscenegraph.org <javascript:>
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> 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/e7a47ee2-115a-4b89-b471-f49723a9117a%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200512/6a96b8ab/attachment.html>
More information about the osg-users
mailing list