|
|
@ -1320,13 +1320,16 @@ namespace MWRender
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mHeadController = NULL;
|
|
|
|
mHeadController = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
NodeMap::iterator found = mNodeMap.find("bip01 head");
|
|
|
|
if (mPtr.getClass().isBipedal(mPtr))
|
|
|
|
if (found != mNodeMap.end() && dynamic_cast<osg::MatrixTransform*>(found->second.get()))
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
osg::Node* node = found->second;
|
|
|
|
NodeMap::iterator found = mNodeMap.find("bip01 head");
|
|
|
|
mHeadController = new RotateController(mObjectRoot.get());
|
|
|
|
if (found != mNodeMap.end() && dynamic_cast<osg::MatrixTransform*>(found->second.get()))
|
|
|
|
node->addUpdateCallback(mHeadController);
|
|
|
|
{
|
|
|
|
mActiveControllers.insert(std::make_pair(node, mHeadController));
|
|
|
|
osg::Node* node = found->second;
|
|
|
|
|
|
|
|
mHeadController = new RotateController(mObjectRoot.get());
|
|
|
|
|
|
|
|
node->addUpdateCallback(mHeadController);
|
|
|
|
|
|
|
|
mActiveControllers.insert(std::make_pair(node, mHeadController));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|