diff --git a/CharacterController2D.cs b/CharacterController2D.cs index 925bfe0..712faf5 100644 --- a/CharacterController2D.cs +++ b/CharacterController2D.cs @@ -3,7 +3,7 @@ public class CharacterController2D : MonoBehaviour { - [SerializeField] private float m_JumpForce = 400f; // Amount of force added when the player jumps. + [SerializeField] private float m_JumpForce = 8f; // Amount of force added when the player jumps. [Range(0, 1)] [SerializeField] private float m_CrouchSpeed = .36f; // Amount of maxSpeed applied to crouching movement. 1 = 100% [Range(0, .3f)] [SerializeField] private float m_MovementSmoothing = .05f; // How much to smooth out the movement [SerializeField] private bool m_AirControl = false; // Whether or not a player can steer while jumping; @@ -128,7 +128,7 @@ public void Move(float move, bool crouch, bool jump) { // Add a vertical force to the player. m_Grounded = false; - m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce)); + m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce), ForceMode2D.Impulse); } }