forked from teamnwah/openmw-tes3coop
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:
parent
ed0c31b485
commit
f1b4c2e400
2 changed files with 2 additions and 2 deletions
|
@ -190,7 +190,7 @@ namespace MWRender
|
||||||
void Camera::setSneakOffset()
|
void Camera::setSneakOffset()
|
||||||
{
|
{
|
||||||
if(mAnimation)
|
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()
|
float Camera::getYaw()
|
||||||
|
|
|
@ -457,7 +457,7 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed)
|
||||||
|
|
||||||
// This has to be done before this function ends;
|
// This has to be done before this function ends;
|
||||||
// updateSkeletonInstance, below, touches the hands.
|
// 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.
|
mFirstPersonOffset = 0.f; // reset the X, Y, Z offset for the next frame.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue