-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RigidBody2D inconsistent bounces near the junction between two squared tiles #76610
Comments
Still relevant in 4.1. |
Can confirm this issue on v4.1.1.stable.official (ignore gravity changes, these are triggered by keyboard) As you can see collisions seems to work weird in between tiles. (bounce is disabled on this clip, yet the ball "skips" sometimes, like it has hit something.) output.mp4 |
Encountered this problem while developing my current game, where I kick a ball creature around to finish a level. The ball is implemented using RigidBody2D to make it's behavior realistic. I avoid most of the problems by prebaking the collision shapes into the tilemap but it doesn't work with slopes, which I still have configure manually in a tileset.
rigidbody2d_stuck.mp4
rigidbody2d_blocked.mp4
rigidbody2d_teleporting.mp4
rigidbidy2d_bounces_back.mp4As you can see, this is rather nasty bug and I would dare to say that it should take a high priority as it can deter some Godot users from using the engine. It's not easy to create workarounds. I think I presented interesting real world situations which hopefully motivate someone to investigate and fix the problem. |
I am interested in this issue has there been any updates or possible leads? |
still an issue in 4.2.2 would really love any sort of fix |
If your level geometry is static, you probably want to pre-bake collisions to avoid this for now: #47148 (comment) |
Should mention that the Rapier2D plugin doesn't have this issue, and seems to be on its way to become the overall better choice for 2D physics, like Jolt has become for 3D. |
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version
4.0-stable
System information
Ubuntu 20.04.6
Issue description
A round RigidBody2D colliding near the junction of two squared tiles can result in wrong and inconsistent bounces. Typically, a RigidBody2D going strictly vertical can result in a bounce with some horizontal velocity.
Possible Related issues:
continuous_cd
values, but setting it tocast_ray
also induces a weird damping behavior (see also #76621).Workaround ideas
balltest-weird-bounce.mp4
Steps to reproduce
Create a Tilemap with squared tiles whose collision shapes are full squares. Create balls (RigidBody2D with round collision shape and a high enough bounce value) and place them above a tile junction, with a small horizontal offset. Run and watch the balls bouncing.
The issue itself is inconsistent: it happens with specific physics parameters at specific positions. To reproduce it correctly, one has to play with those parameters.
Minimal reproduction project
ball-weird-bounce.zip
The text was updated successfully, but these errors were encountered: