Greetings,

I'm running into a little snag here.
I utilized the "CameraNodeFollower" Camera Manipulator as presented in the
NPS tutorial. For all who don't know it basically attaches a node with a
NodeCallback that
obtains the current NodePath of the parent, and multiplies its own offset
from the
parent which is then 'followed'.  e.g., :

struct updateAccumulatedMatrix : public osg::NodeCallback
{
   virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
   {
      matrix = osg::computeWorldToLocal(nv->getNodePath() );
      traverse(node,nv);
   }
   osg::Matrix matrix;
};

OK. What is happening is rather strange. It is attached to a MatrixTransform
object.
When the MatrixTransform is updated with an UpdateCallback,
the underlying object "jitters" every 1/2 to every 1 second (variable).
It is as if the updating of the object in 'out of synch' with the
CameraNodeFollower
CameraManipulator

When I just attached a built-in CameraManipulator, for example a
sgGA::TrackballManipulator,
I don't have the problem. So, it must something with how I am implementing
this NodeFollowerManipulator.

I tried setDataVariance to DYNAMIC on both the MatrixTransform node (parent)
and
the child node with the UpdateCallback attached as above, and that didn't do
anything.
I also played with:
viewer->setThreadingModel(osgViewer::Viewer::SingleThreaded); no change.

Any ideas how to fix this or what might be happening here?

thanks,
Ted
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to