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.

@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
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
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
Copy link
Contributor Author

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

@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
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