aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/solver
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-04-01 10:11:32 +0200
committerCrozet Sébastien <developer@crozet.re>2021-04-01 10:11:32 +0200
commit0ecc302971e353f181c5319504124c3967c89d15 (patch)
treeb97303ebbe051d9c6a9cfaf8ed234edd3a171934 /src/dynamics/solver
parent4fb898c77cb157dae4ea8ae52d4ac4a7a194e11d (diff)
downloadrapier-0ecc302971e353f181c5319504124c3967c89d15.tar.gz
rapier-0ecc302971e353f181c5319504124c3967c89d15.tar.bz2
rapier-0ecc302971e353f181c5319504124c3967c89d15.zip
Some small performance improvements.
Diffstat (limited to 'src/dynamics/solver')
-rw-r--r--src/dynamics/solver/island_solver.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dynamics/solver/island_solver.rs b/src/dynamics/solver/island_solver.rs
index c117457..c684cc5 100644
--- a/src/dynamics/solver/island_solver.rs
+++ b/src/dynamics/solver/island_solver.rs
@@ -77,7 +77,8 @@ impl IslandSolver {
counters.solver.velocity_update_time.resume();
bodies.foreach_active_island_body_mut_internal(island_id, |_, rb| {
- rb.integrate_next_position(params.dt, true)
+ rb.apply_damping(params.dt);
+ rb.integrate_next_position(params.dt);
});
counters.solver.velocity_update_time.pause();
} else {
@@ -87,7 +88,8 @@ impl IslandSolver {
bodies.foreach_active_island_body_mut_internal(island_id, |_, rb| {
// Since we didn't run the velocity solver we need to integrate the accelerations here
rb.integrate_accelerations(params.dt);
- rb.integrate_next_position(params.dt, true);
+ rb.apply_damping(params.dt);
+ rb.integrate_next_position(params.dt);
});
counters.solver.velocity_update_time.pause();
}