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.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user