diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-12-08 19:59:24 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-12-09 09:21:38 +0100 |
commit | 78055cbdaf7aaa953bf1b57e3b4204245e6bcfc3 (patch) | |
tree | f55cb8709c1c4a87186a48fd46a71206e1f08e92 | |
parent | d7b2940eb6293dfc136c379c55c852cf6898c74d (diff) |
Check that motion is not zero before doing a sweep test.
Fixes #25476.
-rw-r--r-- | modules/bullet/space_bullet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index e74c29769f..d73930775d 100644 --- a/modules/bullet/space_bullet.cpp +++ b/modules/bullet/space_bullet.cpp @@ -945,8 +945,8 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform &p_f btVector3 motion; G_TO_B(p_motion, motion); - - { /// phase two - sweep test, from a secure position without margin + if (!motion.fuzzyZero()) { + // Phase two - sweep test, from a secure position without margin const int shape_count(p_body->get_shape_count()); |