1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 22:15:32 +00:00

Non-vr should never roll camera.

This commit is contained in:
Mads Buvik Sandvei 2020-03-31 20:28:43 +02:00
parent eab8326841
commit 7eaf015b87

View file

@ -321,6 +321,7 @@ namespace MWRender
void Camera::setRoll(float angle)
{
#ifdef USE_OPENXR
if (angle > osg::PI) {
angle -= osg::PI * 2;
}
@ -333,6 +334,11 @@ namespace MWRender
else {
mMainCam.roll = angle;
}
#else
// It seems OpenMW saves roll data, causing the camera to get tilted
// when loading a VR save in non-VR.
mMainCam.roll = mPreviewCam.roll = 0.f;
#endif
}
float Camera::getPitch()