Skip to content

Commit

Permalink
Do not set gravity and damping when Custom Integrator is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
madmiraal committed Sep 16, 2020
1 parent 66913e1 commit 119636a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/bullet/rigid_body_bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,13 @@ void RigidBodyBullet::reload_space_override_modificator() {
return;
}

if (omit_forces_integration) {
// Custom behaviour.
btBody->setGravity(btVector3(0, 0, 0));
btBody->setDamping(0, 0);
return;
}

Vector3 newGravity(0.0, 0.0, 0.0);
real_t newLinearDamp = MAX(0.0, linearDamp);
real_t newAngularDamp = MAX(0.0, angularDamp);
Expand Down

0 comments on commit 119636a

Please sign in to comment.