summaryrefslogtreecommitdiff
path: root/modules/bullet
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2019-12-08 19:59:24 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2019-12-09 09:21:38 +0100
commit78055cbdaf7aaa953bf1b57e3b4204245e6bcfc3 (patch)
treef55cb8709c1c4a87186a48fd46a71206e1f08e92 /modules/bullet
parentd7b2940eb6293dfc136c379c55c852cf6898c74d (diff)
Check that motion is not zero before doing a sweep test.
Fixes #25476.
Diffstat (limited to 'modules/bullet')
-rw-r--r--modules/bullet/space_bullet.cpp4
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());