| 304 | #endif |
| 305 | |
| 306 | void 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 | |
| 328 | void Engine::OnLateFixedUpdate() |
| 329 | { |
nothing calls this directly
no test coverage detected