diff --git a/GlitchyEngine/src/World/Scene.bf b/GlitchyEngine/src/World/Scene.bf index a202f9b..976ddab 100644 --- a/GlitchyEngine/src/World/Scene.bf +++ b/GlitchyEngine/src/World/Scene.bf @@ -701,6 +701,7 @@ namespace GlitchyEngine.World } // TODO: Execute Fixed-Updates + TransformSystem.Update(_ecsWorld); } } @@ -754,13 +755,18 @@ namespace GlitchyEngine.World { Debug.Profiler.ProfileRendererFunction!(); - TransformSystem.Update(_ecsWorld); + if (mode.HasFlag(.Physics)) + { + UpdatePhysics(gameTime); + } if (mode.HasFlag(.Scripts)) { UpdateScripts(gameTime, mode); } + TransformSystem.Update(_ecsWorld); + if (!_destroyScriptQueue.IsEmpty) { for (let scriptInstance in _destroyScriptQueue) @@ -784,11 +790,6 @@ namespace GlitchyEngine.World _destroyQueue.Clear(); } - - if (mode.HasFlag(.Physics)) - { - UpdatePhysics(gameTime); - } } /// Creates a new Entity with the given name.