1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 07:53:52 +00:00

Scale the accumulation root translation

This commit is contained in:
Chris Robinson 2013-02-05 16:59:20 -08:00
parent 600fe06f00
commit 16933e3926

View file

@ -196,7 +196,7 @@ Ogre::Vector3 Animation::updatePosition(float time)
posdiff = (mNonAccumRoot->getPosition() - mLastPosition) * mAccumulate;
/* Translate the accumulation root back to compensate for the move. */
mAccumRoot->translate(-posdiff);
mAccumRoot->translate(-posdiff * mAccumRoot->_getDerivedScale());
mLastPosition += posdiff;
}
return posdiff;
@ -220,7 +220,7 @@ void Animation::reset(const std::string &marker)
if(mNonAccumRoot)
{
mLastPosition = mNonAccumRoot->getPosition();
mAccumRoot->setPosition(mStartPosition - mLastPosition);
mAccumRoot->setPosition((mStartPosition - mLastPosition) * mAccumRoot->_getDerivedScale());
}
}