mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 20:11:36 +00:00
reverse Z-axis rotation to make doors happy
This commit is contained in:
parent
40c7a850bf
commit
e8fc942bef
2 changed files with 3 additions and 3 deletions
|
@ -24,5 +24,5 @@ void MouseLookEvent::event(Type type, int index, const void *p)
|
||||||
float y = arg->state.Y.rel * sensY;
|
float y = arg->state.Y.rel * sensY;
|
||||||
|
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
world->rotateObject(world->getPlayer().getPlayer(), -y, 0.f, -x, true);
|
world->rotateObject(world->getPlayer().getPlayer(), -y, 0.f, x, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace MWRender
|
||||||
Ogre::Radian(getPitch() + Ogre::Math::HALF_PI),
|
Ogre::Radian(getPitch() + Ogre::Math::HALF_PI),
|
||||||
Ogre::Vector3::UNIT_X
|
Ogre::Vector3::UNIT_X
|
||||||
);
|
);
|
||||||
Ogre::Quaternion zr(Ogre::Radian(getYaw()), Ogre::Vector3::UNIT_Z);
|
Ogre::Quaternion zr(Ogre::Radian(getYaw()), Ogre::Vector3::NEGATIVE_UNIT_Z);
|
||||||
|
|
||||||
pitchNode->setOrientation(xr);
|
pitchNode->setOrientation(xr);
|
||||||
yawNode->setOrientation(zr);
|
yawNode->setOrientation(zr);
|
||||||
|
@ -130,7 +130,7 @@ namespace MWRender
|
||||||
}
|
}
|
||||||
if (mVanity.enabled) {
|
if (mVanity.enabled) {
|
||||||
Ogre::Vector3 rot(0.f, 0.f, 0.f);
|
Ogre::Vector3 rot(0.f, 0.f, 0.f);
|
||||||
rot.z = Ogre::Degree(-3.f * duration).valueRadians();
|
rot.z = Ogre::Degree(3.f * duration).valueRadians();
|
||||||
rotateCamera(rot, true);
|
rotateCamera(rot, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue