mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Fixed minor stepping issue
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user