From 35d9f0b4fd5150452cbb4f856f5f1963bc8d5191 Mon Sep 17 00:00:00 2001 From: yuni Date: Sun, 17 Nov 2024 01:16:34 +0100 Subject: [PATCH] WIP crisper camera controls (fix gforce calculation) --- src/actor.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index 2adf28c..a2feb67 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -40,7 +40,6 @@ impl Plugin for ActorPlugin { update_power.run_if(game_running), handle_gravity.run_if(game_running), handle_wants_rotation_change.run_if(game_running), - handle_wants_acceleration.run_if(game_running).run_if(alive), handle_wants_maxrotation.run_if(game_running), handle_wants_maxvelocity .run_if(game_running) @@ -50,10 +49,18 @@ impl Plugin for ActorPlugin { ); app.add_systems( PostUpdate, - handle_gforce - .run_if(game_running) - .after(PhysicsSet::Sync) - .after(sync::position_to_transform), + ( + handle_wants_acceleration + .run_if(game_running) + .run_if(alive) + .after(PhysicsSet::Sync) + .after(sync::position_to_transform), + handle_gforce + .run_if(game_running) + .after(PhysicsSet::Sync) + .after(sync::position_to_transform) + .after(handle_wants_acceleration), + ), ); app.add_systems( Update,