From d5bb887ad42a6b7e3efbe9d7c212d851be70512a Mon Sep 17 00:00:00 2001 From: TurboWafflz Date: Wed, 24 Mar 2021 16:56:39 -0400 Subject: [PATCH] Change CursorLockMode to Locked instead of Confined With the CursorLockMode set to confined, at least on Linux, the cursor was able to move to the edges of the window at which point it would no longer be possible to rotate the camera further in that direction. Changing it to locked means that the cursor is locked in the center of the window, which fixes this issue. --- Assets/Code/CameraControl/ControlModeSwitcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Code/CameraControl/ControlModeSwitcher.cs b/Assets/Code/CameraControl/ControlModeSwitcher.cs index 38b8d550..60fbf288 100644 --- a/Assets/Code/CameraControl/ControlModeSwitcher.cs +++ b/Assets/Code/CameraControl/ControlModeSwitcher.cs @@ -17,7 +17,7 @@ public class ControlMode { void Start() { Cursor.visible = false; - Cursor.lockState = CursorLockMode.Confined; + Cursor.lockState = CursorLockMode.Locked; if (this.ControlModes.Any()) { this.SetMode(this.ControlModes[0]); }