Ok, I updated the transform node as given below for position changes and this seems to work. However, when I add an orientation update (i.e. multiply the translation by a rotation) my model disappears completely. Any idea on what's going on with that?
Thanks, -Shayne -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of su hu Sent: Saturday, August 02, 2008 3:19 AM To: OpenSceneGraph Users Subject: Re: [osg-users] moving models... Shayne, In my application, a global buffer is used to input data to osg thread from other thread. I used the method as same as Todd told you. "setMatrix()" is used to update the matrix of that MatrixTransform node. ... osg::ref_ptr<osg::group> root; osg::ref_ptr<osg::MatrixTransform> MotionMatrix; osg::ref_ptr<osg::node> MotionModelFile; //your motion model ... root->addchild(MotionMatrix); MotionMatrix->addchild(MotionModelFile); ... while((!Viewer.done) { ... if(Update is Needed) //position is changed or other MotionMatrix->->setMatrix(osg::Matrix::translate(Pos)); //your position data ... Viewer.frame(); ... } su hu 2008/8/2, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <[EMAIL PROTECTED]>: This is probably a silly and simple question, but does anyone have an example of how to move a model explicitly without using a canned animation? Most of the examples I've seen, update the position in an animation using UpdateCallback. I have a position update coming from another process outside the scenegraph that I need to feed into the model to update its position. Do I need to use an UpdateCallback or a NodeVisitor approach? Any help would be most appreciated. Thanks, -Shayne _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

