Fixed first person offset to use world transform

It slipped my mind that some necks might not be perfectly vertical.
actorid
Alex "rainChu" Haddad 11 years ago
parent ed0c31b485
commit f1b4c2e400

@ -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()

@ -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.

Loading…
Cancel
Save