This commit is contained in:
haitem 2022-01-29 21:29:57 +01:00
commit 3eb64a5b95
1 changed files with 10 additions and 0 deletions

View File

@ -113,6 +113,16 @@ public class PlayerController : MonoBehaviour
jump = false; jump = false;
} }
if(rb.velocity.magnitude != 0 && rb.velocity.normalized == this.downDirection.normalized)
{
// Debug.Log("Player is falling :)");
this.isFalling = true;
}
else
{
this.isFalling = false;
}
if (saveDirection != Vector3.zero) if (saveDirection != Vector3.zero)
{ {
Vector3 axis; Vector3 axis;