-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Collision Algorithm of RigidBody2D #39493
Comments
In my setup (Linux, GeForce MX110, GLES3), only the first collision shows this "bounce" behaviour; after that, no matter how fast I hit, it doesn't overlap. |
I think this issue is a duplicate of another one, but I can't find the other issue in question right now. |
I thought so too at first. I've heard that Godot is currently undergoing a major refactoring. |
RigidBody2Ds do have long standing issues with interpenetration during the frame, and I've never known the CCD from the node property to alleviate this or even work at high speed. When it passes into other bodies is also inconsistent. I once used them for characters, and most the time jumping and landing was fine, but every dozen landings the character might dig into the surface and halt their velocity. |
CCD has been broken for several years :( |
so is it open? |
Yes, there's an open issue somewhere about it. |
Possibly related: #34215 |
This is because, by default, the objects are only moved each frame 0.3 times the distance it would take to completely separate them. I'm guessing this is to make collisions involving multiple objects more stable, but I don't really know. You can change the custom solver bias variable on the collision shapes involved to change this behavior, including setting it all the way to 1 to make collisions perfectly rigid. Again, this probably causes some instability, though. |
Duplicate of #34215 – the underlying cause is the same. |
Godot version:3.2.1
OS/device including version:
Windows10, gtx1050, GLES3
Issue description:
See the gif movie first.
During the second collision, RigidBody2D has a significant overlap.
Essentially, overlap in a collision should not be drawn.
If an overlap is detected, you can push it back and then draw it so that it won't be drawn on the screen at all.
Perhaps the order of the process is reversed?
If collision processing is performed after drawing, the pushback will be drawn in the next frame, causing overlap in the current frame.
RB2D_Test.zip
Postscript:
Changing Physics fps or Continuous Cd will not improve the overlap.
The text was updated successfully, but these errors were encountered: