Greetings all,

I'm using the CameraManipulator from the NPS 11.x tutorial to follow a
MatrixTransform
object. The MatrixTransform position/orientation per usual with an Node
UpdateCallback.

The manipulator simply attaches a node to the MatrixTransform node
with a callback which grabs the parent NodePath (of the MatrixTransform
node),
represented in WOrld coordinates; i.e., per the demo code:.

<snip>
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;
};
<snip>

What happens is that the object appears to occasionally be lagging a frame
(or 2??) behind
the updated viewer object's camera position/orientation.
The affect is that the updated position of the object will 'jitter' say,
every 10 frames or something like that...

I tried to setDataVariance(osg::Object::Dynamic) for both the
MatrixTransform and the node of
the object being moved and still the same problem.
But, when I attach a built in CameraManipulator (TrackBallManipulator) to
the viewer
CameraManipulator, I don't have the problem.

It is as if the node with the Callback is being called sometimes before,
or sometimes after,  the MatrixTransform parent object's callback. Possible?
What might I be missing? Is there a way to control when the
CameraManipulator is updating
the view matrix?

the app is running under WinXP 32b through wxWIndows/Visual Studio9, if that
matters.

thanks very much for any insights, suggestions, help--

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

Reply via email to