Update direction in PreUpdate.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
e1a1522269
commit
1fb194266c
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user