More accurate calculation for recover motion in test_body_motion #45643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extracted from PR #35945 by @madmiraal
Using min/max from different axes instead of adding recovery vectors together in order to avoid cases where the recovery is too high when colliding with several shapes at once along the same direction.
PR on 3.2 branch: #45644
Tests for 2D using https://github.com/godotengine/godot-demo-projects/tree/master/2d/physics_tests:
One Way Collision:
No regression.
Character - Tilemap:
No regression.
KinematicBody2D with ray shapes is not working properly with on-way collision, but that was already the case before.
Floor is detected consistently with ray shapes, prevents some jittering.
Character - Slopes:
No regression.
Floor is detected more consistently with ray shapes (still not perfect).
Tests for 3D (we don't have character controller tests in 3D in the test framework yet):
Test #33833 using MRP:
No regression.
Test #34081 using MRP from #35945 (comment):
No regression.
Test with more than 4 colliding bodies from a modified version of the same project:
No regression. This case was actually already fixed by #42574.