diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-03-13 15:28:33 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2022-03-20 21:49:16 +0100 |
| commit | 1535db87c7e21065dfbc736ffe5927810d37fe75 (patch) | |
| tree | f7ee534b0601b6ca6eeee2d6404610312d072b7e /src/dynamics/integration_parameters.rs | |
| parent | 34b0d51455cbeba16dd5bacb451e476efb591518 (diff) | |
| download | rapier-1535db87c7e21065dfbc736ffe5927810d37fe75.tar.gz rapier-1535db87c7e21065dfbc736ffe5927810d37fe75.tar.bz2 rapier-1535db87c7e21065dfbc736ffe5927810d37fe75.zip | |
Add a max penetration correction integration parameter
Diffstat (limited to 'src/dynamics/integration_parameters.rs')
| -rw-r--r-- | src/dynamics/integration_parameters.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dynamics/integration_parameters.rs b/src/dynamics/integration_parameters.rs index bab0fe2..e66f72d 100644 --- a/src/dynamics/integration_parameters.rs +++ b/src/dynamics/integration_parameters.rs @@ -36,6 +36,8 @@ pub struct IntegrationParameters { /// Amount of penetration the engine wont attempt to correct (default: `0.001m`). pub allowed_linear_error: Real, + /// Maximum amount of penetration the solver will attempt to resolve in one timestep. + pub max_penetration_correction: Real, /// The maximal distance separating two objects that will generate predictive contacts (default: `0.002`). pub prediction_distance: Real, /// Maximum number of iterations performed to solve non-penetration and joint constraints (default: `4`). @@ -150,6 +152,7 @@ impl Default for IntegrationParameters { joint_erp: 1.0, joint_damping_ratio: 1.0, allowed_linear_error: 0.001, // 0.005 + max_penetration_correction: Real::MAX, prediction_distance: 0.002, max_velocity_iterations: 4, max_velocity_friction_iterations: 8, |
