You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
When using move_and_slide() on a KinematicBody2D that has a rectangular collision shape, if the corner of its collision shape happens to collide with the corner of another body with a rectangular collision shape, the KinematicBody2D will get stuck and return a high get_slide_count().
Here’s a GIF from the attached minimal reproduction project.
In the GIF, the box on the right has been aligned so that its left side has the same x position as the floors right side. This perfect alignment is what causes the bug.
The left boxes right side is not perfectly aligned with the floors left side. It has been placed a single pixel more so to the right, allowing it to avoid the bug.
From what I’ve discovered, changing the safe margin of the falling bodies to very high or very low amounts prevents this bug from occurring but due to the other collision problems that occur with very high or very low safe margins it is not a viable solution.
In my experience this bug is more prevalent in low resolution pixel platforming games. It’s a rare occurrence but when it crops up it can cause the character to get stuck in a permanent falling state.
Godot version:
3.2.1 and 3.2.2 Beta 1
Issue description:
When using move_and_slide() on a KinematicBody2D that has a rectangular collision shape, if the corner of its collision shape happens to collide with the corner of another body with a rectangular collision shape, the KinematicBody2D will get stuck and return a high get_slide_count().
Here’s a GIF from the attached minimal reproduction project.
In the GIF, the box on the right has been aligned so that its left side has the same x position as the floors right side. This perfect alignment is what causes the bug.
The left boxes right side is not perfectly aligned with the floors left side. It has been placed a single pixel more so to the right, allowing it to avoid the bug.
From what I’ve discovered, changing the safe margin of the falling bodies to very high or very low amounts prevents this bug from occurring but due to the other collision problems that occur with very high or very low safe margins it is not a viable solution.
In my experience this bug is more prevalent in low resolution pixel platforming games. It’s a rare occurrence but when it crops up it can cause the character to get stuck in a permanent falling state.
Minimal reproduction project:
Corner Bug Example.zip
The text was updated successfully, but these errors were encountered: