Skip to content

Commit

Permalink
Fix multiple issues with test_body_motion() and test_body_ray_separat…
Browse files Browse the repository at this point in the history
…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
madmiraal committed Jul 21, 2020
1 parent 470bbee commit 8385c83
Show file tree
Hide file tree
Showing 5 changed files with 483 additions and 571 deletions.
Loading

0 comments on commit 8385c83

Please sign in to comment.