We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68f492b commit e940a4aCopy full SHA for e940a4a
1 file changed
crates/lambda-rs-platform/src/physics/rapier2d.rs
@@ -200,8 +200,14 @@ impl PhysicsBackend2D {
200
pub fn new(gravity: [f32; 2], timestep_seconds: f32) -> Self {
201
let gravity_vector = Vector::new(gravity[0], gravity[1]);
202
203
+ // `lambda-rs` exposes substep control at the `PhysicsWorld2D` layer.
204
+ // Rapier's default `num_solver_iterations = 4` also subdivides the step
205
+ // for integration, which changes free-body motion even when the public
206
+ // world is configured with one substep. Keep this at `1` so only
207
+ // `PhysicsWorld2D::substeps` controls outer-step subdivision.
208
let integration_parameters = IntegrationParameters {
209
dt: timestep_seconds,
210
+ num_solver_iterations: 1,
211
..Default::default()
212
};
213
0 commit comments