Remove IntegrationParameters::inv_dt and make dt pub

This commit is contained in:
Emil Ernerfeldt
2021-01-22 13:32:18 +01:00
parent 97031a6851
commit 95c6199a9a
3 changed files with 12 additions and 17 deletions

View File

@@ -144,6 +144,7 @@ impl VelocityConstraint {
out_constraints: &mut Vec<AnyVelocityConstraint>,
push: bool,
) {
let inv_dt = params.inv_dt();
let rb1 = &bodies[manifold.body_pair.body1];
let rb2 = &bodies[manifold.body_pair.body2];
let mj_lambda1 = rb1.active_set_offset;
@@ -244,7 +245,7 @@ impl VelocityConstraint {
rhs += manifold.restitution * rhs
}
rhs += manifold_point.dist.max(0.0) * params.inv_dt();
rhs += manifold_point.dist.max(0.0) * inv_dt;
let impulse = manifold_points[k].impulse * warmstart_coeff;