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.s...@epfl.ch> 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-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to