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