diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index fe20d1d..0b2dcb2 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -33,7 +33,6 @@ public class PlayerController : MonoBehaviour private int wall = 0; private int dive = 0; private float maxSpeedStore; - private float maxSpeedCap = 100; private float accelerationStore; private float capsuleHeight; private float controllerHeight; @@ -296,14 +295,10 @@ public class PlayerController : MonoBehaviour //Remove or "lower" friction to add an 'ice' effect velocity.x = Mathf.SmoothDamp(velocity.x, 0.0f, ref xVelocity, friction); velocity.z = Mathf.SmoothDamp(velocity.z, 0.0f, ref zVelocity, friction); + maxSpeed = 25; } - if(maxSpeed > maxSpeedCap) - { - maxSpeed = maxSpeedCap; - } - if(characterController.velocity == new Vector3(0, 0, 0)) { maxSpeed = maxSpeedStore;