diff --git a/kubi/src/fly_controller.rs b/kubi/src/fly_controller.rs index 5b303f4..2822d2a 100644 --- a/kubi/src/fly_controller.rs +++ b/kubi/src/fly_controller.rs @@ -42,7 +42,7 @@ fn update_movement( dt: UniqueView, ) { if inputs.movement == Vec2::ZERO { return } - let movement = inputs.movement.normalize_or_zero() * 30. * dt.0.as_secs_f32(); + let movement = inputs.movement * 30. * dt.0.as_secs_f32(); for (_, mut transform) in (&controllers, &mut transforms).iter() { let (scale, rotation, mut translation) = transform.0.to_scale_rotation_translation(); translation += (rotation * Vec3::NEG_Z).normalize() * movement.y; diff --git a/kubi/src/input.rs b/kubi/src/input.rs index 3e763de..6b92835 100644 --- a/kubi/src/input.rs +++ b/kubi/src/input.rs @@ -111,7 +111,9 @@ fn update_input_state_gamepad ( fn input_end( mut inputs: UniqueViewMut, ) { - inputs.movement = inputs.movement.normalize_or_zero(); + if inputs.movement.length() >= 1. { + inputs.movement = inputs.movement.normalize(); + } } pub fn init_input (