From 79c42fa36e55408ee77be9ed37c13db109c76d08 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Wed, 14 Oct 2020 18:29:41 +0200 Subject: [PATCH] Change the default number of iterations of the velocity and position solver --- CHANGELOG.md | 2 ++ include/reactphysics3d/engine/PhysicsWorld.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb86105..b0771ca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ do not hesitate to take a look at the user manual. - Rolling resistance constraint is not solved anymore in the solver. Angular damping needs to be used instead to simulate this - The List class has been renamed to Array + - The default number of iterations for the velocity solver is now 6 instead of 10 + - The default number of iterations for the position solver is now 3 instead of 5 ### Removed diff --git a/include/reactphysics3d/engine/PhysicsWorld.h b/include/reactphysics3d/engine/PhysicsWorld.h index fa603517..bafe96c7 100644 --- a/include/reactphysics3d/engine/PhysicsWorld.h +++ b/include/reactphysics3d/engine/PhysicsWorld.h @@ -127,8 +127,8 @@ class PhysicsWorld { defaultBounciness = decimal(0.5); restitutionVelocityThreshold = decimal(0.5); isSleepingEnabled = true; - defaultVelocitySolverNbIterations = 10; - defaultPositionSolverNbIterations = 5; + defaultVelocitySolverNbIterations = 6; + defaultPositionSolverNbIterations = 3; defaultTimeBeforeSleep = 1.0f; defaultSleepLinearVelocity = decimal(0.02); defaultSleepAngularVelocity = decimal(3.0) * (PI_RP3D / decimal(180.0));