Hello Martin,
I change the run function into the animation loop, like your example. Is the
idea to use the camera node as the root node the mistake?
As Alberto noted, the viewer already has a camera. When you were
creating a new camera and adding that to the viewer, you effectively had
two cameras one under the other:
camera
camera
scene
Because when you do setSceneData(), it adds whatever node you gave as
child to the viewer's camera.
So having two cameras, whose projection and view matrices were being
applied one after the other, was the mistake. You could have created a
new camera, and then done viewer->setCamera(myCamera), and that would
have probably worked (if your other settings were correct). But you
might as well use the viewer's camera, and just add your actual scene
using setSceneData(). That's the generally accepted usage model.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org