额,初始化了啊?
osg::AnimationPathCallback* animPathCallback = new osg::AnimationPathCallback();
osg::ref_ptr<osg::Group> Root1 = door1->asGroup();
int i = 0;
for (i = 0; i < Root1->getNumChildren(); i++)
{
animPathCallback = dynamic_cast<osg::AnimationPathCallback*> (Root1->getChild(i)->getUpdateCallback());//取到动画属性
animPathCallback->setPause(true);
}