-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Incorrect bounce angle of RigidBody2D when using the Cast Ray Continuous Cd mode #32138
Comments
Setting "Continuous Cd" on the Ball to "Cast Shape" seems to make it behave correctly (tested with 3.2-alpha 24e1039). I couldn't tell you why though. |
Yes, I can confirm, it works with "Cast shape". Thanks. Just to give you a bit more context. I've tried to implement borders in previous version by collision shape in TileMap. And it behaved in a similar manner. And "Cast Shape" didn't work. You need me to make another sample project for that? |
@GaidamakUA Yeah that would definitely help, if it isn't too much trouble. |
It's pretty same but collision is implemented via tilest |
https://www.reddit.com/r/godot/comments/eerh7a/why_is_my_bouncing_inconsistent/ I have the same issues in my project using 3.1 |
I have exactly the same issue. I would guess the object is travelling inside the static body and this is causing it to lose accuracy somewhere. I have seen this on Windows 10 and Linux. The issue can be reduced somewhat with a slower moving object and "Cast shape" a little better but cannot remove it totally. |
I can confirm what @maximinus is saying using a square rather than circle collision shape, using cast shape collision reduces this significantly but doesn't fix the issue fully. As result if one was to create a bouncing ball that goes down and bounces up on collision it would eventually start bounding other angle and at different speed despite no other forces being used. What is worse documentation suggest that RidigBody2d should be exatly what we are supposed to use for simple games where we want ball to collide with some blocks. |
The contact seems to be flipped. Don't exactly know whats going on with the function, but it seems a little off. godot/servers/physics_2d/body_pair_2d_sw.cpp Lines 214 to 217 in 24e1039
|
This may be related to #28438. It appears to occur when colliding with the point between two |
This still seems to happen in 4.2.1. Is there any plan for a fix? It's been 4 years. |
Godot version:
v3.1.1.stable.official
OS/device including version:
Mac OS X and Linux Ubuntu
Issue description:
RigidBody2d collides with flat StaticBody2d and bounces with random angle. Often, with the same it came from. Happens on relatively high speed of RigidBody2d
Steps to reproduce:
Here are the description with video and screenshots attached:
https://www.reddit.com/r/godot/comments/d4455z/bug_i_godot_physics_system/
Minimal reproduction project:
https://github.com/GaidamakUA/GodotExperiments/tree/master/arcanoid
The text was updated successfully, but these errors were encountered: