From 609be908f967deff0df58c0ffe861ecfee2b4acf Mon Sep 17 00:00:00 2001 From: mushgunAX Date: Fri, 25 Nov 2022 20:18:36 +0800 Subject: [PATCH] Revert "Made player jumping more responsive" This reverts commit d6fab4439f266cb4b4bf42835c16bd6026df602a. --- Assets/Scripts/Gameplay/Player/SC_PlayerController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index 5e5f7f08..47dd2c41 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -285,7 +285,7 @@ public class PlayerController : Script { if (currentState == RaccoonStates.WALKING || currentState == RaccoonStates.RUNNING || currentState == RaccoonStates.IDLE) { - if (Input.GetKey(Input.KeyCode.Space) && isGrounded && rb != null) + if (Input.GetKeyDown(Input.KeyCode.Space) && isGrounded && rb != null) { currentState = RaccoonStates.JUMP; Vector3 v = rb.LinearVelocity; @@ -304,7 +304,7 @@ public class PlayerController : Script } } - if(!isGrounded && rb != null && (rb.LinearVelocity.y < 0.0f || !Input.GetKey(Input.KeyCode.Space))) + if(!isGrounded && rb != null && (rb.LinearVelocity.y < 0.0f || Input.GetKeyUp(Input.KeyCode.Space))) currentState = RaccoonStates.FALLING; }