Fixes gravity calculation for kinematic bodies in Bullet
(cherry picked from commit 5fb8a6a6c2
)
This commit is contained in:
parent
8efb9c8cdd
commit
5975b44ded
|
@ -832,7 +832,8 @@ void RigidBodyBullet::on_exit_area(AreaBullet *p_area) {
|
||||||
|
|
||||||
void RigidBodyBullet::reload_space_override_modificator() {
|
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;
|
return;
|
||||||
|
|
||||||
Vector3 newGravity(space->get_gravity_direction() * space->get_gravity_magnitude());
|
Vector3 newGravity(space->get_gravity_direction() * space->get_gravity_magnitude());
|
||||||
|
|
Loading…
Reference in New Issue