non-shaky camera updates (especially while moving fast)

This commit is contained in:
yuni 2024-03-30 16:52:22 +01:00
parent 7431c4f594
commit 3f656924e1

View file

@ -4,6 +4,8 @@ use bevy::window::PrimaryWindow;
use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings};
use bevy::core_pipeline::tonemapping::Tonemapping;
use bevy_xpbd_3d::prelude::*;
use bevy_xpbd_3d::PhysicsSchedule;
use bevy_xpbd_3d::PhysicsStepSet;
use std::f32::consts::*;
use crate::{settings, audio, actor};
@ -14,7 +16,7 @@ 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(Update, sync_camera_to_player);
app.add_systems(PhysicsSchedule, sync_camera_to_player.in_set(PhysicsStepSet::BroadPhase));
app.add_systems(Update, update_fov);
app.add_systems(Update, apply_input_to_player);
}