diff options
| author | Emil Ernerfeldt <emil.ernerfeldt@gmail.com> | 2021-02-03 18:18:03 +0100 |
|---|---|---|
| committer | Emil Ernerfeldt <emil.ernerfeldt@gmail.com> | 2021-02-08 17:15:28 +0100 |
| commit | d999e0e8c61aa2f115dc256e8011543cda8af7ef (patch) | |
| tree | 2248cea87b31398039e2d0f2ec9107c3285450b5 /src/pipeline | |
| parent | 17ef7e10f9235db12aaee98b5106201824d16bfc (diff) | |
| download | rapier-d999e0e8c61aa2f115dc256e8011543cda8af7ef.tar.gz rapier-d999e0e8c61aa2f115dc256e8011543cda8af7ef.tar.bz2 rapier-d999e0e8c61aa2f115dc256e8011543cda8af7ef.zip | |
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.
Diffstat (limited to 'src/pipeline')
| -rw-r--r-- | src/pipeline/physics_pipeline.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |
