From 78055cbdaf7aaa953bf1b57e3b4204245e6bcfc3 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sun, 8 Dec 2019 19:59:24 +0100 Subject: [PATCH] Check that motion is not zero before doing a sweep test. Fixes #25476. --- modules/bullet/space_bullet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp index e74c29769fc..d73930775db 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());