#is_on_floor() doesn't work on the edge of a platform

1 messages · Page 1 of 1 (latest)

desert shore
#

As you can see, when I set the position to 119.5, the very edge of the platform, the player doesn't recognize being on the floor after landing

#

Which is very problematic for my game, since you can't move while in the air

desert shore
#

I just tested it, and is_on_wall() returns true in this state

desert shore
#

Here's a temporary solution I came up with:

#
if(is_on_wall() && !is_on_floor() && velocity.y > 0 && get_position_delta().y == 0):
    global_position.y += 0.5```
#

Pushing them into the floor slightly dislodges them from this