-
-
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
Fix test_body_motion() sometimes failing to extracting collision information #43616
Conversation
Rebased following merge of #42574. |
Rebased following merge of #43923. |
Rebased following merge of #45519. |
Rebased following merge of #37547. |
Removes duplicated code, unnecessary loops and unnecessary checks. Adds missing checks and generates appropriate errors.
To ensure that collision information is extracted and possible motion is precise, the minimum contact depth must be 0. Therefore, there is no need for this parameter.
Ensures callback is always called. Enables callback to control minimum depth checks.
aa44447
to
c2f5a3d
Compare
Rebased following merge of #45852. |
Generate appropriate error messages if it fails.
c2f5a3d
to
3540339
Compare
Rebased following merge of #45854. |
Is this something that can be merged? It appears like it could fix this type of behavior? |
A lot of the linked issues have been addressed in other PRs, and this hasn't been updated in a while. So I think this needs to be remade against the current master to only fix the remaining issues. |
@madmiraal Could you rebase your? Many of the issues you listed have been fixed already, but #23140 and #43346 are still not fixed so it would be great if your fixes could be upstreamed! |
Currently, in Godot physics 2D and 3D,
test_body_motion()
sometimes fails to extract collision information, which results in the collision being ignored. This problem is aggravated when the collision margin is reduced. The most common reason for reducing collision margins is to overcome the problem that touching, but not overlapping objects are treated as colliding. This PR ensures:Fixes #16414
Fixes #23140
Fixes #36432
Fixes #37798
Fixes #43346
Addresses comment
Although these issues all have the same source, fixing them required making multiple changes:
To facilitate these changes this PR has refactored Godot 2D and 3D
SpaceSW
, the Godot GJK EPA API and the Godot 3Dsolve_distance()
algorithm. I have kept all these changes in separate commits to facilitate review and potential future troubleshooting (the refactoring changes modified a lot of lines of code, but they should not change behaviour).The refactoring of
SpaceSW
is comprehensive. To isolate the disparate issues, the code was standardised, which involved: