From f24231d0e8306ebab036313c10c7994a698abd44 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Wed, 9 Aug 2023 09:59:15 -0400 Subject: [PATCH] Fixed minor stepping issue --- Nuake/Engine.cpp | 2 +- Nuake/src/Core/Physics/DynamicWorld.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Nuake/Engine.cpp b/Nuake/Engine.cpp index e212817b..a143ecc9 100644 --- a/Nuake/Engine.cpp +++ b/Nuake/Engine.cpp @@ -63,7 +63,7 @@ namespace Nuake // Fixed update while (s_FixedUpdateDifference >= s_FixedUpdateRate) { - s_CurrentWindow->FixedUpdate(s_FixedUpdateDifference); + s_CurrentWindow->FixedUpdate(s_FixedUpdateRate); s_FixedUpdateDifference -= s_FixedUpdateRate; } diff --git a/Nuake/src/Core/Physics/DynamicWorld.cpp b/Nuake/src/Core/Physics/DynamicWorld.cpp index 57718b35..349243d5 100644 --- a/Nuake/src/Core/Physics/DynamicWorld.cpp +++ b/Nuake/src/Core/Physics/DynamicWorld.cpp @@ -483,10 +483,10 @@ namespace Nuake // Next step ++_stepCount; - // If you take larger steps than 1 / 60th of a second you need to do multiple collision steps in order to keep the simulation stable. + // If you take larger steps than 1 / 90th of a second you need to do multiple collision steps in order to keep the simulation stable. // Do 1 collision step per 1 / 60th of a second (round up). int collisionSteps = 1; - constexpr float minStepDuration = 1.0f / 30.0f; + constexpr float minStepDuration = 1.0f / 90.0f; constexpr int maxStepCount = 32; if(ts > minStepDuration)