From 163717bd6fd437085f241d5c8d84cc35bfa901de Mon Sep 17 00:00:00 2001 From: Nick Julian <43791234+NRJulian@users.noreply.github.com> Date: Sat, 22 Jun 2019 14:25:08 -0400 Subject: [PATCH] Fix typo that may cause crouch to always be true A typo in the `if` statement in line 67 may cause the `crouch` bool to always check `true`. This revision simply changes the `(!crouch)` in line 67 to the intended `(crouch)` so that the script works as expected. Thank you! --- CharacterController2D.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CharacterController2D.cs b/CharacterController2D.cs index 925bfe0..914823d 100644 --- a/CharacterController2D.cs +++ b/CharacterController2D.cs @@ -64,7 +64,7 @@ private void FixedUpdate() public void Move(float move, bool crouch, bool jump) { // If crouching, check to see if the character can stand up - if (!crouch) + if (crouch) { // If the character has a ceiling preventing them from standing up, keep them crouching if (Physics2D.OverlapCircle(m_CeilingCheck.position, k_CeilingRadius, m_WhatIsGround))