mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-28 23:06:41 +00:00
Apply legs yaw to accumulated movement.
This commit is contained in:
parent
7742ba165a
commit
93b723a066
1 changed files with 4 additions and 2 deletions
|
@ -1235,9 +1235,11 @@ namespace MWRender
|
||||||
mRootController->setEnabled(enable);
|
mRootController->setEnabled(enable);
|
||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
mRootController->setRotate(osg::Quat(mLegsYawRadians, osg::Vec3f(0, 0, 1))
|
osg::Quat legYaw = osg::Quat(mLegsYawRadians, osg::Vec3f(0, 0, 1));
|
||||||
* osg::Quat(mBodyPitchRadians, osg::Vec3f(1, 0, 0)));
|
mRootController->setRotate(legYaw * osg::Quat(mBodyPitchRadians, osg::Vec3f(1, 0, 0)));
|
||||||
yawOffset = mLegsYawRadians;
|
yawOffset = mLegsYawRadians;
|
||||||
|
// When yawing the root, also update the accumulated movement.
|
||||||
|
movement = legYaw * movement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mSpineController)
|
if (mSpineController)
|
||||||
|
|
Loading…
Reference in a new issue