Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multiple issues with test_body_motion() and test_body_ray_separat…
…on(). The test_body_motion() and test_body_ray_separation() functions perform an initial recovery step to attempt to move the body to a safe place before testing whether the body can safely move. Currently this is done in four partial steps, and during each step the detected penetrations are reversed by summing them together. This patch changes this approach to a single step and uses the maximum penetration instead of the sum. The same approach is applied to Godot Physics 2D, 3D and Bullet Physics, and to both CollisionShapes and RayShapes. Also, fixes Bullet physics not detecting collisions and relying on the recovery step. Furthermore, ensures that Bullet physics only moves a safe amount by using a binary search as done in Godot physics.
- Loading branch information