I've found a strange issue when using the NodeTrackerManipulator and the node being tracked rolls inverted.  When it hits 90 degrees the camera jumps from head-on perspective to tail perspective (or basically 180 degrees off of whatever it was in).  When the node rolls back the problem fixes itself.

 

To reproduce the problem open up osgsimulation.cpp and replace the ModelPositionCallback::updateParameters function with this:

 

void updateParameters()

{

   _longitude += ((2.0*osg::PI)/360.0)/20.0;

   _rotation = _rotation * osg::Quat(.01, osg::Vec3(1.0, 0.0, 0.0)); // Add a roll

}

 

And make sure to run it with the tracker set to NODE_CENTER_AND_AZIM.

 

I don't think the problem here is specific to the NodeTrackerManipulator -- I discovered it while working on a home-brewed manipulator.  The numbers appear to be coming in this way from the matrix when computeLocalToWorld transform is called.

 

Can anyone provide me any insight as to why this happens?

 

Thanks

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to