mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 07:21:12 +00:00
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
@ -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…
x
Reference in New Issue
Block a user