Fixed minor stepping issue

This commit is contained in:
Antoine Pilote
2023-08-09 09:59:15 -04:00
parent 03c18842f8
commit f24231d0e8
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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)