Can Jump when touching the wall

The Player can jump if touching the wall, not the ground. Like in the scene below.

Is there a way to fix it?

This issue was adressed in later lessons. You just need to set friction to 0.

1 Like

Hey, so I set the friction to 0 but I still got the problem, what can be causing it. Thanks in advance!

A bit delayed, but in case anyone else is having the issue I’ll through this here anyway. My guess is that the issue is linked to the fact that you are allowing the player to jump whenever they are touching the ground, but the “isGrounded” check is checking if any part of the player’s collider is touching any part of the tilemap collider. My suggestion for solving this issue is to add a second small collider to the player where the player’s feet are, check the “Is Trigger” box for that collider, and then use the “OnTriggerEnter2D” and “OnTriggerExit2D” (instead of OnCollisionEnter2D) for checking if the player is touching the ground.

1 Like

Privacy & Terms