Skip to content

Commit ff1ae62

Browse files
authored
Fix incorrect doc about GamepadAxis::RightZ/LeftZ (#18114)
# Objective Documentation correction. # Reasoning The `GamepadAxis::RightZ` and `LeftZ` do not map to the trigger buttons on a gamepad. They are in fact for the twisting/yaw of a flight Joystick and throttle lever respectively. I confirmed this with two gamepads that has analog triggers (Logitech F710, 8bitdo ultimate BT controller) and a HOTAS joystick (Saitek X52).
1 parent 36cb64b commit ff1ae62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/bevy_input/src/gamepad.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,16 +635,16 @@ pub enum GamepadAxis {
635635
LeftStickX,
636636
/// The vertical value of the left stick.
637637
LeftStickY,
638-
/// The value of the left `Z` button.
638+
/// Generally the throttle axis of a HOTAS setup.
639+
/// Refer to [`GamepadButton::LeftTrigger2`] for the analog trigger on a gamepad controller.
639640
LeftZ,
640-
641641
/// The horizontal value of the right stick.
642642
RightStickX,
643643
/// The vertical value of the right stick.
644644
RightStickY,
645-
/// The value of the right `Z` button.
645+
/// The yaw of the main joystick, not supported on common gamepads.
646+
/// Refer to [`GamepadButton::RightTrigger2`] for the analog trigger on a gamepad controller.
646647
RightZ,
647-
648648
/// Non-standard support for other axis types (i.e. HOTAS sliders, potentiometers, etc).
649649
Other(u8),
650650
}

0 commit comments

Comments
 (0)