From 5975b44ded00de4febbe3f8cf5eee7d45e0cd59b Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Sat, 10 Feb 2018 17:38:34 -0500 Subject: [PATCH] Fixes gravity calculation for kinematic bodies in Bullet (cherry picked from commit 5fb8a6a6c223561e1e7a11699eae8aca68f8abd6) --- modules/bullet/rigid_body_bullet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index 96a53f9f8b8..f96218ef46a 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -832,7 +832,8 @@ void RigidBodyBullet::on_exit_area(AreaBullet *p_area) { void RigidBodyBullet::reload_space_override_modificator() { - if (!is_active()) + // Make sure that kinematic bodies have their total gravity calculated + if (!is_active() && PhysicsServer::BODY_MODE_KINEMATIC != mode) return; Vector3 newGravity(space->get_gravity_direction() * space->get_gravity_magnitude());