aboutsummaryrefslogtreecommitdiff
path: root/src_testbed
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2024-04-24 22:37:21 +0200
committerSébastien Crozet <sebastien@crozet.re>2024-04-30 23:10:46 +0200
commitc079452a478bb2f5d976cbba162e7f92252b505d (patch)
tree9ecee7655f135a8d916060df95b265f9314a9408 /src_testbed
parent6635d49c8bdaca13011a888d3901436eb79c599e (diff)
downloadrapier-c079452a478bb2f5d976cbba162e7f92252b505d.tar.gz
rapier-c079452a478bb2f5d976cbba162e7f92252b505d.tar.bz2
rapier-c079452a478bb2f5d976cbba162e7f92252b505d.zip
feat: add IntegrationParameters::length_unit to adjust internal threshold based on user-defined length units
Diffstat (limited to 'src_testbed')
-rw-r--r--src_testbed/testbed.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src_testbed/testbed.rs b/src_testbed/testbed.rs
index a575f98..d5406d0 100644
--- a/src_testbed/testbed.rs
+++ b/src_testbed/testbed.rs
@@ -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;
}
}
}