From e8dac480ec4fd96e2ab91df33bd52ff3f4aea5be Mon Sep 17 00:00:00 2001 From: Trey Shaw Date: Wed, 1 Jul 2026 07:40:37 -0500 Subject: [PATCH] bounce pad --- Assets/Scripts/Management/PlayerController.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Management/PlayerController.cs b/Assets/Scripts/Management/PlayerController.cs index a47379a..3aa4af3 100644 --- a/Assets/Scripts/Management/PlayerController.cs +++ b/Assets/Scripts/Management/PlayerController.cs @@ -437,8 +437,12 @@ public Vector3 GetVelocity() /// public void Bounce(float bounciness) { - float bounceForce = -verticalVelocity * bounciness; - moveDir.y = bounceForce; + if (verticalVelocity < -3f) + { + float bounceForce = -verticalVelocity * bounciness; + verticalVelocity = bounceForce; + moveDir.y = bounceForce; + } } #endregion @@ -473,7 +477,6 @@ private void OnControllerColliderHit(ControllerColliderHit hit) if (bouncePad != null) { Bounce(bouncePad.bounciness); - Debug.Log("Bounce! " + verticalVelocity); } } }