From 07e93e261eb0626a3c4c79cc556f7af923ec334d Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 13 Feb 2024 09:52:26 +0100 Subject: [PATCH] Fix physics simulation result collection to happen before draw or next update --- Source/Engine/Engine/Engine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Engine/Engine/Engine.cpp b/Source/Engine/Engine/Engine.cpp index 259649062..fe7541adb 100644 --- a/Source/Engine/Engine/Engine.cpp +++ b/Source/Engine/Engine/Engine.cpp @@ -214,9 +214,6 @@ int32 Engine::Main(const Char* cmdLine) Time::OnEndDraw(); FrameMark; } - - // Collect physics simulation results (does nothing if Simulate hasn't been called in the previous loop step) - Physics::CollectResults(); } // Call on exit event @@ -288,6 +285,9 @@ void Engine::OnLateFixedUpdate() // Update services EngineService::OnLateFixedUpdate(); + + // Collect physics simulation results (does nothing if Simulate hasn't been called in the previous loop step) + Physics::CollectResults(); } void Engine::OnUpdate()