Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | max.marauder |
I’m using move_and_slide()
, and in any other cases it works fine, including detection of the floor and walls.
However, if it happens so that the body falls right on the edge of a wall, like shown on the following picture:
![1]
it stucks like that until moved in some direction.
I tried to print is_on_floor()
and is_on_wall()
values while in such state, and found that they are constantly changing like this:
wall=false,
floor=false
wall=true,
floor=false
wall=false,
floor=true
wall=false,
floor=false
wall=true,
floor=false
wall=false```
which looks like it can't decide - whether it's on the floor or on a wall.
If I change body's position by at least 0.01 left or right, then it starts working fine: the body just either lands on the platform, or keeps falling further down.
Any suggestions?
[1]: https://i.imgur.com/Ak301HB.png