forked from mirror/openmw-tes3mp
Use a child scene node for the accumulation root
This commit is contained in:
parent
b6354c6282
commit
d6f923f274
2 changed files with 3 additions and 4 deletions
|
@ -48,7 +48,7 @@ Animation::~Animation()
|
|||
|
||||
void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model)
|
||||
{
|
||||
mInsert = node;
|
||||
mInsert = node->createChildSceneNode();
|
||||
assert(mInsert);
|
||||
|
||||
mEntityList = NifOgre::Loader::createEntities(mInsert, model);
|
||||
|
@ -76,8 +76,7 @@ void Animation::createEntityList(Ogre::SceneNode *node, const std::string &model
|
|||
if(data.isEmpty() || !Ogre::any_cast<bool>(data))
|
||||
continue;
|
||||
|
||||
mAccumRoot = skelinst->getRootBone();
|
||||
mAccumRoot->setManuallyControlled(true);
|
||||
mAccumRoot = mInsert;
|
||||
mNonAccumRoot = skelinst->getBone(bone->getHandle());
|
||||
|
||||
mStartPosition = mNonAccumRoot->getInitialPosition();
|
||||
|
|
|
@ -22,7 +22,7 @@ protected:
|
|||
Ogre::SceneNode* mInsert;
|
||||
NifOgre::EntityList mEntityList;
|
||||
std::map<std::string,NifOgre::TextKeyMap> mTextKeys;
|
||||
Ogre::Bone *mAccumRoot;
|
||||
Ogre::Node *mAccumRoot;
|
||||
Ogre::Bone *mNonAccumRoot;
|
||||
Ogre::Vector3 mAccumulate;
|
||||
Ogre::Vector3 mStartPosition;
|
||||
|
|
Loading…
Reference in a new issue