From 364de8a94439bb00c313acc570a64d9d9c13110c Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Wed, 4 Jun 2025 22:16:16 -0700 Subject: [PATCH] Fix issue with mouse (new input system) --- Assets/Scripts/GamePlayer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/GamePlayer.cs b/Assets/Scripts/GamePlayer.cs index 9f35344..d57a3c3 100644 --- a/Assets/Scripts/GamePlayer.cs +++ b/Assets/Scripts/GamePlayer.cs @@ -150,7 +150,7 @@ public class GamePlayer : MonoBehaviour { doMoveRight = true; } - if (controllerJump || Keyboard.current.spaceKey.isPressed || Keyboard.current.upArrowKey.isPressed || Keyboard.current.wKey.isPressed || (Mouse.current.IsPressed() && PlayerPrefs.GetInt("Setting2", 0) == 0) || (Gamepad.current != null && Gamepad.current.buttonSouth.isPressed)) + if (controllerJump || Keyboard.current.spaceKey.isPressed || Keyboard.current.upArrowKey.isPressed || Keyboard.current.wKey.isPressed || (Mouse.current.leftButton.isPressed && PlayerPrefs.GetInt("Setting2", 0) == 0) || (Gamepad.current != null && Gamepad.current.buttonSouth.isPressed)) { doJump = true; } @@ -168,7 +168,7 @@ public class GamePlayer : MonoBehaviour GameObject backButton = GameObject.Find("BackButton"); if (!Application.isMobilePlatform) { - if (Mouse.current.IsPressed()) + if (Mouse.current.leftButton.isPressed) { UnityEngine.Vector3 touchPosition = Camera.main.ScreenToWorldPoint(Pointer.current.position.ReadValue()); touchPosition.z = 0f;