aboutsummaryrefslogtreecommitdiff
path: root/src/pipeline
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/pipeline
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/pipeline')
-rw-r--r--src/pipeline/physics_pipeline.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs
index 0c1685b..3884e19 100644
--- a/src/pipeline/physics_pipeline.rs
+++ b/src/pipeline/physics_pipeline.rs
@@ -113,7 +113,7 @@ impl PhysicsPipeline {
self.broadphase_collider_pairs.clear();
broad_phase.update(
integration_parameters.dt,
- integration_parameters.prediction_distance,
+ integration_parameters.prediction_distance(),
colliders,
bodies,
modified_colliders,
@@ -143,7 +143,7 @@ impl PhysicsPipeline {
events,
);
narrow_phase.compute_contacts(
- integration_parameters.prediction_distance,
+ integration_parameters.prediction_distance(),
integration_parameters.dt,
bodies,
colliders,
@@ -174,6 +174,7 @@ impl PhysicsPipeline {
self.counters.stages.island_construction_time.resume();
islands.update_active_set_with_contacts(
integration_parameters.dt,
+ integration_parameters.length_unit,
bodies,
colliders,
narrow_phase,