[DesktopVRSwitch] Nuke CohtmlUISystem Gamepad handling for now.

This commit is contained in:
NotAKidoS 2023-06-19 23:47:43 -05:00
parent 5f95755ad2
commit 0fb7c3d401
19 changed files with 146 additions and 21 deletions

View file

@ -1,5 +1,6 @@
using ABI_RC.Core.Player;
namespace NAK.DesktopVRSwitch.VRModeTrackers;
public class PlayerSetupTracker : VRModeTracker
@ -29,8 +30,11 @@ public class PlayerSetupTracker : VRModeTracker
// This might error if we started in VR.
// '_cam' is not set until Start().
CVR_DesktopCameraController.UpdateFov();
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.