From d999e0e8c61aa2f115dc256e8011543cda8af7ef Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 3 Feb 2021 18:18:03 +0100 Subject: Apply accelerations during velocity solver Closes https://github.com/dimforge/rapier/issues/97 Instead of applying accelerations from gravity and external forces as a separate step, this PR switches to applying them in the velocity solver. --- src/pipeline/physics_pipeline.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pipeline') diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs index 80d7833..293fa9d 100644 --- a/src/pipeline/physics_pipeline.rs +++ b/src/pipeline/physics_pipeline.rs @@ -154,7 +154,7 @@ impl PhysicsPipeline { self.counters.stages.update_time.start(); bodies.foreach_active_dynamic_body_mut_internal(|_, b| { b.update_world_mass_properties(); - b.integrate_accelerations(integration_parameters.dt, *gravity) + b.add_gravity(*gravity) }); self.counters.stages.update_time.pause(); -- cgit