You're trying to set the view matrix on the camera which may get
overwritten by the camera manipulator at the beginning of each frame.
Instead, check your camera manipulator (e.g. TrackballManipulator) if it
has a member function that accepts a view matrix.

Some camera manipulators (like the Terrain manipilator) keep a center
position, a distance and an Euler angle with respect to the center. Setting
these values might work, while setting the view matrix directly may not
work.

Also in the beginning the camera manipulators compute a default home
position and use it. Make sure you apply your own view matrix at a later
point in time.

Christian


2012/11/15 michael kapelko <[email protected]>

> Hi.
> I have default viewer without any special manipulator specified. I try to
> setViewMatrix for camera to position it, but it doesn't work.
> Code: http://pastie.org/5382807
> It needs to be run from Data directory.
>
> Am I doing it wrong?
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to