diff --git a/src/camera.rs b/src/camera.rs index d92f4dc..0a659b7 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -3,8 +3,8 @@ use bevy::input::mouse::MouseMotion; use bevy::window::PrimaryWindow; use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings}; use bevy::core_pipeline::tonemapping::Tonemapping; +use bevy::transform::TransformSystem; use bevy_xpbd_3d::prelude::*; -use bevy_xpbd_3d::{PhysicsSchedule, PhysicsStepSet}; use std::f32::consts::*; use crate::{settings, audio, actor}; @@ -15,7 +15,9 @@ impl Plugin for CameraControllerPlugin { app.add_systems(Startup, setup_camera); app.add_systems(Update, handle_input); app.add_systems(Update, manage_player_actor); - app.add_systems(PhysicsSchedule, sync_camera_to_player.in_set(PhysicsStepSet::BroadPhase)); + app.add_systems(PostUpdate, sync_camera_to_player + .after(PhysicsSet::Sync) + .before(TransformSystem::TransformPropagate)); app.add_systems(Update, update_fov); app.add_systems(Update, apply_input_to_player); }