[DesktopVRSwitch] Handle CVRWorld- Post Processing & FOV settings.

This commit is contained in:
NotAKidoS 2023-06-20 18:23:23 -05:00
parent 70ae268149
commit 900c6646af
17 changed files with 62 additions and 48 deletions

View file

@ -1,6 +1,5 @@
using ABI_RC.Core.Player;
namespace NAK.DesktopVRSwitch.VRModeTrackers;
public class PlayerSetupTracker : VRModeTracker
@ -27,16 +26,5 @@ public class PlayerSetupTracker : VRModeTracker
_playerSetup.desktopCameraRig.SetActive(!intoVR);
_playerSetup.vrCameraRig.SetActive(intoVR);
// This might error if we started in VR.
// '_cam' is not set until Start().
if (CVR_DesktopCameraController._cam == null)
CVR_DesktopCameraController._cam = _playerSetup.desktopCamera.GetComponent<UnityEngine.Camera>();
CVR_DesktopCameraController.UpdateFov();
// UICamera has a script that copies the FOV from the desktop cam.
// Toggling the cameras on/off resets the aspect ratio,
// so when rigs switch, that is already handled.
}
}