Merge pull request #43801 from nekomatata/bullet-ccd-disabled

Fix ccd enabled by default on Bullet bodies
This commit is contained in:
Rémi Verschelde 2020-12-03 13:28:48 +01:00 committed by GitHub
commit 5861bac21e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -744,7 +744,7 @@ void RigidBodyBullet::set_continuous_collision_detection(bool p_enable) {
}
btBody->setCcdSweptSphereRadius(radius * 0.2);
} else {
btBody->setCcdMotionThreshold(10000.0);
btBody->setCcdMotionThreshold(0.);
btBody->setCcdSweptSphereRadius(0.);
}
}
@ -824,7 +824,7 @@ void RigidBodyBullet::reload_shapes() {
btBody->updateInertiaTensor();
reload_kinematic_shapes();
set_continuous_collision_detection(btBody->getCcdMotionThreshold() < 9998.0);
set_continuous_collision_detection(is_continuous_collision_detection_enabled());
reload_body();
}