Merge pull request #62708 from madmiraal/fix-40508-3.x

This commit is contained in:
Rémi Verschelde 2022-07-07 23:54:45 +02:00 committed by GitHub
commit 600c1c4dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -917,6 +917,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);