Can I use is_on_floor to detect walls? And also can I use two different is on floor ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ius10

My game have a jumping mechanism which use is_on_floor to be sure player dont jump infinity.
Right now I want to make a wall jump mechanic.

Keep it simple - is_on_floor is used to test, well, the floor. Don’t break that, it’ll lead to confusion. Instead, a typical approach is to raycast from the player and figure out if they’re ‘touching’ the wall (an alternative could be to use an Area to do the same). If the player is touching the wall (or area overlaps) and they’re !on_floor then you can wall jump.

spaceyjase | 2021-11-15 16:28

:bust_in_silhouette: Reply From: DaddyMonster

Godot has is_on_wall() for that very purpose: