summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-09 10:02:02 +0100
committerGitHub <noreply@github.com>2019-12-09 10:02:02 +0100
commite447f5ab044c7b0cbc99d61da34afa9f5e15b349 (patch)
tree0216a3b747dafa6bab5a4eb56b11ad04cc4bb9df
parent3684810a283780d1c691b3e5bd78e0e36b869fc6 (diff)
parent78055cbdaf7aaa953bf1b57e3b4204245e6bcfc3 (diff)
Merge pull request #34210 from madmiraal/fix-bullet-motion-test
Check that motion is not zero before doing a sweep test.
-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());