Hi barral,

As David said, don't use osgProducer, use osgViewer::Viewer.  It sounds like 
you don't need multiple "View"s as the OSG calls them, you just need your 
camera to move back and forth between a top view and a first-person view.  You 
don't need multiple cameras - and setCamera won't do what you think it will do, 
I tried it and discovered that already myself.  What you should do is write 
either a CameraManipulator or an UpdateCallback for your camera - deriving your 
own class from CameraManipulator would probably be considered the more proper 
approach in your case (someone correct me if I'm wrong).  The existing 
CameraManipulators, like StandardManipulator for example, already do event 
handling so you can look at those as a starting point.  You will want to 
override the handle method so that when the key of your choice is pressed, you 
can set the camera's view matrix to either the top view or first person view.

There's even a pre-existing CameraManipulator called 
CameraViewSwitchManipulator that looks like it might be very promising for you 
- although I have no experience with it personally.  At the very least it'd be 
a good place to start...

Cheers,
Tom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31920#31920





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to