From 80d5d01698b1a9e2606778090c5a84a2e2f241a5 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 17 Mar 2008 12:23:06 +0000 Subject: [PATCH] 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. --- examples/osgparticleeffects/osgparticleeffects.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/osgparticleeffects/osgparticleeffects.cpp b/examples/osgparticleeffects/osgparticleeffects.cpp index 6a589bd53..000b59a54 100644 --- a/examples/osgparticleeffects/osgparticleeffects.cpp +++ b/examples/osgparticleeffects/osgparticleeffects.cpp @@ -94,7 +94,8 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius) positioned->addChild(glider); - osg::PositionAttitudeTransform* xform = new osg::PositionAttitudeTransform; + 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);