From 0703e5527fd95d86bb6621e61dbcb1a6e7f9329a Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 16 Jan 2022 16:40:59 +0100 Subject: Fix some solver issues - Fix the wrong codepath taken by the solver for contacts involving a collider without parent. - Properly adress the non-linear treatment of the friction direction - Simplify the sleeping strategy - Add an impulse resolution multiplier --- src/dynamics/integration_parameters.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/dynamics/integration_parameters.rs') diff --git a/src/dynamics/integration_parameters.rs b/src/dynamics/integration_parameters.rs index d998eec..844db41 100644 --- a/src/dynamics/integration_parameters.rs +++ b/src/dynamics/integration_parameters.rs @@ -30,6 +30,13 @@ pub struct IntegrationParameters { /// (default `0.0`). pub erp: Real, + /// 0-1: multiplier applied to each accumulated impulse during constraints resolution. + /// This is similar to the concept of CFN (Constraint Force Mixing) except that it is + /// a multiplicative factor instead of an additive factor. + /// Larger values lead to stiffer constraints (1.0 being completely stiff). + /// Smaller values lead to more compliant constraints. + pub delassus_inv_factor: Real, + /// Amount of penetration the engine wont attempt to correct (default: `0.001m`). pub allowed_linear_error: Real, /// The maximal distance separating two objects that will generate predictive contacts (default: `0.002`). @@ -96,6 +103,7 @@ impl Default for IntegrationParameters { min_ccd_dt: 1.0 / 60.0 / 100.0, velocity_solve_fraction: 1.0, erp: 0.8, + delassus_inv_factor: 0.75, allowed_linear_error: 0.001, // 0.005 prediction_distance: 0.002, max_velocity_iterations: 4, -- cgit