Fixed first person offset to use world transform

It slipped my mind that some necks might not be perfectly vertical.
This commit is contained in:
Alex "rainChu" Haddad 2013-10-02 07:03:39 -04:00
parent ed0c31b485
commit f1b4c2e400
2 changed files with 2 additions and 2 deletions

View file

@ -190,7 +190,7 @@ namespace MWRender
void Camera::setSneakOffset()
{
if(mAnimation)
mAnimation->addFirstPersonOffset(Ogre::Vector3(-9.8f, 0.f, 0.f));
mAnimation->addFirstPersonOffset(Ogre::Vector3(0.f, 0.f, -9.8f));
}
float Camera::getYaw()

View file

@ -457,7 +457,7 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed)
// This has to be done before this function ends;
// updateSkeletonInstance, below, touches the hands.
node->translate(mFirstPersonOffset);
node->translate(mFirstPersonOffset, Ogre::Node::TS_WORLD);
}
mFirstPersonOffset = 0.f; // reset the X, Y, Z offset for the next frame.