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.x] Fix Rayshape recovery in test_body_ray_separation #53453

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

pouleyKetchoupp
Copy link
Contributor

Based on partial backport from #51896, in addition to #46149 applied to ray shapes.

These changes improve Rayshape behavior for Godot Physics 2D and 3D when using move_and_slide with and without snapping.

Kinematic margin is now applied to ray shapes when handling snapping collision tests and separation raycasts to help getting consistent results in slopes and flat surfaces.

Recovery is calculated without the margin and a depth of 0 is still considered a collision to stabilize results when on flat surface.

Recovery depth takes into account the current recovery vector (just like test_body_motion) to fix jittering issues with multiple ray shapes due to applying too much recovery.

Fixes #34098 and #34663 in 3.x when using Godot Physics.
Also tested for regression in 2D physics tests demo project.
Doesn't affect anything outside of ray shapes in kinematic body.

These changes improve Rayshape behavior for Godot Physics 2D and 3D
when using move_and_slide with and without snapping.

Kinematic margin is now applied to ray shapes when handling snapping
collision tests and separation raycasts to help getting consistent
results in slopes and flat surfaces.

Recovery is calculated without the margin and a depth of 0 is still
considered a collision to stabilize results when on flat surface.

Recovery depth takes into account the current recovery vector (just like
test_body_motion) to fix jittering issues with multiple ray shapes due
to applying too much recovery.
@akien-mga akien-mga merged commit abb1413 into godotengine:3.x Oct 6, 2021
@akien-mga
Copy link
Member

Thanks!

@pouleyKetchoupp pouleyKetchoupp deleted the fix-rayshape-snap-3.x branch October 6, 2021 16:51
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.

None yet

2 participants