MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnFixedUpdate

Method OnFixedUpdate

Source/Engine/Engine/Engine.cpp:306–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304#endif
305
306void Engine::OnFixedUpdate()
307{
308 PROFILE_CPU_NAMED("Fixed Update");
309
310 Physics::FlushRequests();
311
312 // Call event
313 FixedUpdate();
314
315 // Update services
316 EngineService::OnFixedUpdate();
317
318 if (!Time::GetGamePaused())
319 {
320 const float dt = Time::Physics.DeltaTime.GetTotalSeconds();
321 Physics::Simulate(dt);
322
323 // After this point we should not modify physic objects state (rendering operations is mostly readonly)
324 // That's because auto-simulation mode is performing rendering during physics simulation
325 }
326}
327
328void Engine::OnLateFixedUpdate()
329{

Callers

nothing calls this directly

Calls 2

OnFixedUpdateFunction · 0.85
GetGamePausedFunction · 0.85

Tested by

no test coverage detected