The next thing I wanted to do after placing a tree on my terrain was to set my osgviewer camera to a predefined location to look at my tree. I was able to run through the same steps as my last post to create a new position matrix that was a certain height above the terrain. I extracted the Vec3d from the position matrix using:
Code: osg::Vec3d cameraPositionXZY = cameraPosition.getTrans(); osg:Vec3d cameraCenterXYZ = treePosition.getTrans(); I then used the code: Code: viewer.getCameraManipulator()->setHomePosition(cameraPositionXZY,cameraCenterXYZ,???); viewer.home(); to set the camera to look at my tree from a preset position. My question is, how can I extract the "Up" vector (3rd argument labeled ???) based on my camera position while in my geocentric reference frame? ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42799#42799 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

