void World_PhysicsUpdate(TimeSpan delta) { control.EngineState = cruise ? EngineStates.Cruise : EngineStates.Standard; if (Thn == null || !Thn.Running) { ProcessInput(delta); } #if false pyw.PlotPoint(0, control.PlayerPitch); pyw.PlotPoint(1, control.PlayerYaw); pyw.PlotPoint(2, control.Roll); #endif //Has to be here or glitches camera.ChasePosition = player.PhysicsComponent.Body.Position; camera.ChaseOrientation = player.PhysicsComponent.Body.Transform.ClearTranslation(); camera.Update(delta); }
void World_PhysicsUpdate(TimeSpan delta) { control.EngineState = cruise ? EngineStates.Cruise : EngineStates.Standard; if (Thn == null || !Thn.Running) { ProcessInput(delta); } #if false pyw.PlotPoint(0, control.PlayerPitch); pyw.PlotPoint(1, control.PlayerYaw); pyw.PlotPoint(2, control.Roll); #endif //Has to be here or glitches camera.ChasePosition = player.PhysicsComponent.Body.Position; camera.ChaseOrientation = player.PhysicsComponent.Body.Transform.ClearTranslation(); camera.Update(delta); if ((Thn == null || !Thn.Running)) //HACK: Cutscene also updates the listener so we don't do it if one is running { Game.Sound.UpdateListener(delta, camera.Position, camera.CameraForward, camera.CameraUp); } }