diff --git a/src/application.cpp b/src/application.cpp index a2e8ea8..63b3a58 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -154,7 +154,9 @@ Clay_RenderCommandArray RenderApplication() { static uint64_t lastStep = 0; if (isSimulating) { double deltaTime{ (double)(SDL_GetTicks() - lastStep) * 0.001 }; - if (deltaTime > 0.16) { + constexpr double targetDeltaTime = 1.0/24.0; + if (deltaTime > targetDeltaTime) { + lastStep = SDL_GetTicks(); simulation::Step(); } }