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:
parent
eab8326841
commit
7eaf015b87
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue