Check if player is on ground ?

My player cant double jump but he can fall of a platform and still jump.
My code is like this: [156571-anmærkning-2020-04-13-170211.png|156571]

Hope you can help me :smiley:

Hey man! Pretty easy once you think about it.

  1. All ground should have a tag, for example, “ground”
  2. In the onCollisionEnter, write an if statement:

If (other.gameObject.tag == “ground”)
{ isOnGround = true; }
Else {isOnGround = false;}