feat: add IntegrationParameters::length_unit to adjust internal threshold based on user-defined length units
This commit is contained in:
committed by
Sébastien Crozet
parent
6635d49c8b
commit
c079452a47
@@ -1355,15 +1355,15 @@ fn update_testbed(
|
||||
{
|
||||
if state.flags.contains(TestbedStateFlags::SLEEP) {
|
||||
for (_, body) in harness.physics.bodies.iter_mut() {
|
||||
body.activation_mut().linear_threshold =
|
||||
RigidBodyActivation::default_linear_threshold();
|
||||
body.activation_mut().normalized_linear_threshold =
|
||||
RigidBodyActivation::default_normalized_linear_threshold();
|
||||
body.activation_mut().angular_threshold =
|
||||
RigidBodyActivation::default_angular_threshold();
|
||||
}
|
||||
} else {
|
||||
for (_, body) in harness.physics.bodies.iter_mut() {
|
||||
body.wake_up(true);
|
||||
body.activation_mut().linear_threshold = -1.0;
|
||||
body.activation_mut().normalized_linear_threshold = -1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user