forked from teamnwah/openmw-tes3coop
Scale the accumulation root translation
This commit is contained in:
parent
600fe06f00
commit
16933e3926
1 changed files with 2 additions and 2 deletions
|
@ -196,7 +196,7 @@ Ogre::Vector3 Animation::updatePosition(float time)
|
||||||
posdiff = (mNonAccumRoot->getPosition() - mLastPosition) * mAccumulate;
|
posdiff = (mNonAccumRoot->getPosition() - mLastPosition) * mAccumulate;
|
||||||
|
|
||||||
/* Translate the accumulation root back to compensate for the move. */
|
/* Translate the accumulation root back to compensate for the move. */
|
||||||
mAccumRoot->translate(-posdiff);
|
mAccumRoot->translate(-posdiff * mAccumRoot->_getDerivedScale());
|
||||||
mLastPosition += posdiff;
|
mLastPosition += posdiff;
|
||||||
}
|
}
|
||||||
return posdiff;
|
return posdiff;
|
||||||
|
@ -220,7 +220,7 @@ void Animation::reset(const std::string &marker)
|
||||||
if(mNonAccumRoot)
|
if(mNonAccumRoot)
|
||||||
{
|
{
|
||||||
mLastPosition = mNonAccumRoot->getPosition();
|
mLastPosition = mNonAccumRoot->getPosition();
|
||||||
mAccumRoot->setPosition(mStartPosition - mLastPosition);
|
mAccumRoot->setPosition((mStartPosition - mLastPosition) * mAccumRoot->_getDerivedScale());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue