Fixed moving model bug where the moving model code was looking for a transform with DataVariance set to DYNAMIC, but the scene graph set up code was leaving the setting to default to STATIC. Fix involved setting DataVariance on moving transoforms to DYNAMIC.

This commit is contained in:
Robert Osfield 2008-03-17 12:23:06 +00:00
parent 42e3cb6bf2
commit 80d5d01698

View File

@ -95,6 +95,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
positioned->addChild(glider);
osg::PositionAttitudeTransform* xform = new osg::PositionAttitudeTransform;
xform->setDataVariance(osg::Object::DYNAMIC);
xform->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0,0.5));
xform->addChild(positioned);
@ -119,6 +120,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
positioned->addChild(cessna);
osg::MatrixTransform* xform = new osg::MatrixTransform;
xform->setDataVariance(osg::Object::DYNAMIC);
xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0f,1.0));
xform->addChild(positioned);