Update direction in PreUpdate.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Nolan Darilek 2022-08-04 14:30:40 -05:00
parent e1a1522269
commit 1fb194266c

View File

@ -98,7 +98,6 @@ fn movement_controls<S>(
if let Some(pair) = actions.clamped_axis_pair(NavigationAction::Move) {
cleanup = true;
let direction = pair.xy();
let strength = direction.length();
let forward_backward_movement_factor = if direction.x > 0. {
config.forward_movement_factor
} else if direction.x < 0. {
@ -382,7 +381,7 @@ where
.register_type::<MaxSpeed>()
.register_type::<RotationSpeed>()
.add_plugin(InputManagerPlugin::<NavigationAction>::default())
.add_system_to_stage(CoreStage::PostUpdate, update_direction)
.add_system_to_stage(CoreStage::PreUpdate, update_direction)
.add_system_to_stage(CoreStage::PostUpdate, remove_direction)
.add_system(tick_snap_timers)
.add_system(speak_direction.chain(error_handler))