alright so i came back here to ask how do i switch my switch statement into if statement because it looks like in a switch statement you cant check if something is false and use else for example in my code im trying to check if my cube is touching the ground then i can jump. but i cant put an else statement so as soon as it touches the ground i can keep pressing space to jump infinitely after touching the ground once. how do i check for it if its not touching the ground?
private void OnCollisionEnter(Collision collision)
{
switch (collision.gameObject.tag)
{
case "Ground":
IsGrounded = true;
break;
}
}