Just for some clarification are you trying to make a camera that follows your 
car model?  Because I had the similar issue recently and through my research I 
found I could attach a camera manipulator to a node and the camera will be 
translated relative to the position of the PositionAttitudeTransform.   

*Note  I needed to attach the manipulator to a child of the 
PositionAttitudeTransform.  In your case it would be the Node that you loaded 
the model file.


Code:

osg::ref_ptr<osgGA::NodeTrackerManipulator> manipulator = new 
osgGA::NodeTrackerManipulator;

manipulator->setTrackerMode(osgGA::NodeTrackerManipulator::NODE_CENTER);
manipulator->setRotationMode(osgGA::NodeTrackerManipulator::TRACKBALL);

osg::ref_ptr<osg::PositionAttitudeTransform> vehicleRoot = 
dynamic_cast<osg::PositionAttitudeTransform *>(node);

if(vehicleRoot.valid())
{
manipulator->setTrackNode(vehicleRoot.getTrackerNode());
}




Hopefully this helps with your what your trying to accomplish

Scott[/code]

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





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

Reply via email to