Fix physics simulation result collection to happen before draw or next update

This commit is contained in:
Wojtek Figat
2024-02-13 09:52:26 +01:00
parent 36beac5154
commit 07e93e261e

View File

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