public void Update(IGameContext gameContext, IUpdateContext updateContext) { if (gameContext.World != _currentWorld || _shadowWorld == null) { if (_shadowWorld != null) { _shadowWorld.Dispose(); } _shadowWorld = _physicsFactory.CreateShadowWorld(); _currentWorld = gameContext.World; } using (_profiler.Measure("phys-step")) { _shadowWorld.Update(gameContext, updateContext); } }