Skip to content

Commit

Permalink
Fine-tune camera scheduling in the shooter-like demo
Browse files Browse the repository at this point in the history
  • Loading branch information
idanarye committed Apr 28, 2024
1 parent a344b47 commit 343f2bf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion demos/src/bin/shooter_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ fn main() {
tnua_demos_crate::levels_setup::for_3d_platformer::setup_level,
);
app.add_systems(Startup, setup_player);
app.add_systems(Update, (grab_ungrab_mouse, apply_camera_controls));
app.add_systems(Update, grab_ungrab_mouse);
app.add_systems(PostUpdate, {
let system = apply_camera_controls;
#[cfg(feature = "rapier")]
let system = system.after(PhysicsSet::SyncBackend);
#[cfg(feature = "xpbd")]
let system = system.after(PhysicsSet::Sync);
system.before(bevy::transform::TransformSystem::TransformPropagate)
});
app.add_systems(
match app_setup_configuration.schedule_to_use {
ScheduleToUse::Update => Update.intern(),
Expand Down

0 comments on commit 343f2bf

Please sign in to comment.