Skip to content

[v0.20.0-rc.1] PS4 Controller triggers (LeftTrigger2, RightTrigger2) incorrectly register as Other(6), Other(7) #25879

Description

@hyoi

Bevy version and features

  • bevy = "0.20.0-rc.1"
  • Features: Default
  • os: Windows 11 Home
[package]
name = "abnormal_gamepad_button_input"
version = "0.1.0"
edition = "2024"

[dependencies]
bevy = "0.20.0-rc.1"
#bevy = "0.19.1"

What you did

  • In bevy "v0.20.0-rc.1", lightly pressing the trigger buttons on a PS4 controller (DualShock 4) causes them to be recognized as GamepadButton::Other(6) or Other(7) instead of LeftTrigger2 or RightTrigger2.
  • Pressing the same buttons firmly results in them being recognized as LeftTrigger2 or RightTrigger2, as expected.
  • This issue did not occur with bevy "v0.19.1".

What went wrong

  • Summary of observed behavior.
pressing 0.19.1 0.20.0-rc.1
lightly LeftTrigger2 / RightTrigger2 Other(6) / Other(7)
firmly LeftTrigger2 / RightTrigger2 LeftTrigger2 / RightTrigger2
  • Sample code.
use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_systems(Update, update)
        .run();
}

fn update(gamepads: Query<(&Gamepad, &GamepadSettings)>) {
    for (gamepad, settings) in gamepads {
        let pressed_buttons: Vec<_> = gamepad.get_just_pressed().collect();
        if !pressed_buttons.is_empty() {
            info!("pressed: {:?}", pressed_buttons);
            info!("gamepad: {:#?}", gamepad);
            info!("settings: {:#?}", settings);
        }
    }
}

Additional information

  • The default values for GamepadSettings are identical for bevy "v0.19.1" and bevy "v0.20.0-rc.1".
  • This issue did not occur with my Xbox 360 controller.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreC-BugAn unexpected or incorrect behaviorI-RegressionFunctionality that used to work but no longer does. Add a test for this!

    Type

    No type

    Projects

    • Status
      Needs SME Triage

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions