From be37c3a6edcd17499768fbb2f26c629e8f1d3fb4 Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 16 May 2021 18:53:40 +0800 Subject: [PATCH] simulate serverworld physics --- Assets/Scenery/Bootstrap.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Scenery/Bootstrap.cs b/Assets/Scenery/Bootstrap.cs index ea3512f98..7e5f4f04f 100644 --- a/Assets/Scenery/Bootstrap.cs +++ b/Assets/Scenery/Bootstrap.cs @@ -85,4 +85,11 @@ void OnSceneLoaded(Scene scene, LoadSceneMode mode) Strip(ServerWorld); } } + + void FixedUpdate() + { + // then simulate physics in our server physics scene too + // TODO 2D? + ServerWorld.GetPhysicsScene().Simulate(Time.fixedDeltaTime); + } }