Skip to content
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

[3.2] Fix multiple issues with one-way collisions #42575

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

madmiraal
Copy link
Contributor

3.2 version of #42574, i.e a salvage of #40645.

@madmiraal madmiraal added this to the 3.2 milestone Oct 5, 2020
@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch 2 times, most recently from d7f0bf6 to e63187f Compare October 5, 2020 16:47
@RandomShaper
Copy link
Member

I'm approving this for the same reasons explained here: #42574 (comment). (In this case, considering 3.2 is the production release, the part about testing a project which uses one-way heavily is much more important.)

@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch from bfa5036 to a7d06a7 Compare October 18, 2020 07:30
@RandomShaper RandomShaper self-requested a review October 19, 2020 08:28
@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch from a7d06a7 to 780fc6b Compare October 19, 2020 16:29
@madmiraal
Copy link
Contributor Author

madmiraal commented Oct 19, 2020

Updated with the changes applied to #42574 i.e. both KinematicBody and RigidBody treat perpendicular contacts as pass through; and removed the change that was causing the bug.

@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch from 780fc6b to a327229 Compare October 28, 2020 18:10
@madmiraal
Copy link
Contributor Author

Updated to include a fix for the bugs identified by @Rhathe here and here.

@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch 3 times, most recently from 53b7e04 to 98604f1 Compare October 30, 2020 12:45
@madmiraal
Copy link
Contributor Author

madmiraal commented Oct 30, 2020

Updated to properly fix the bugs identified by @Rhathe.

@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch from 98604f1 to eb2d3fb Compare November 2, 2020 10:13
@madmiraal
Copy link
Contributor Author

Updated to include the fix for #43266, identified by @AttackButton here.

@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch from eb2d3fb to 83f326c Compare November 3, 2020 13:20
@madmiraal
Copy link
Contributor Author

Updated to ensure the work around applied in the previous update only applies during the unsticking phase.

@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch 2 times, most recently from f66f43e to 736e036 Compare November 5, 2020 06:27
@madmiraal
Copy link
Contributor Author

Updated to include the small refactor that removed some unneeded code.

For RigidBodies, uses the collision normal determined by relative motion
to determine whether or not a one-way collision has occurred.

For KinematicBodies, performs additional checks to ensure a one-way
collision has occurred, and averages the recovery step over all collision
shapes.

Co-authored-by:    Sergej Gureev <[email protected]>
@madmiraal madmiraal force-pushed the fix-one-way-collisions-3.2 branch from 736e036 to 1061bb3 Compare January 7, 2021 09:23
@madmiraal
Copy link
Contributor Author

Updated to include the changes applied to #42574:

  1. Tolerances for dot product direction calculations.
  2. Applied the division by cbk.amount for recovery motion to test_body_ray_separation and to both in Godot 3D too for consistency.

@akien-mga akien-mga merged commit 292bbb8 into godotengine:3.2 Jan 7, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants