-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direction pad buttons not working #3229
Comments
Okay. I've just noticed that there is a This seems counter-intuitive to me. Most APIs treat the directional pad buttons as at least buttons, a few supporting an analog API (axis here) in addition to this. Is this intended behavior, or a bug? If intended then API documentation would help, and removing the buttons from the |
The difference is that the buttons return a binary output, while the axes will return a float showing intensity :) The DPad buttons are working for me on Windows 10 with an XBox controller: which gamepad are you using? Could you test the gamepad on a different tool to verify that it's our (or more likely, gilrs's) issue? Perhaps https://gamepad-tester.com/ ? I would also test our upstream examples: https://github.com/Arvamer/gilrs/tree/master/gilrs/examples |
But digital pads are .. digital 😅
XBOX One S Wireless
Tried gamepad tester and everything was nice and flickery there. I can try |
How does it report the d-pad? Can you show a screenshot while pressing one or more of the d-pad buttons? |
Hopefully this table will suffice, as it'll cover all of the buttons.
For an "at rest" reference, here's an image from the gamepad tester: It might also be worth mentioning that this particular setup is using the standard USB kernel module not the custom bluetooth ones like xpadneo. I have the controller plugged in directly via USB cable. |
It reports the d-pad as two axis and not as four d-pad buttons. This matches how bevy responds. |
Noted. I wonder why this controller behaves differently than the one that @alice-i-cecile has.. Also this will prevent me from having simple I guess it's a known issue though. I'm okay with closing this as it doesn't appear to be a problem with |
Since I just found this, I'm going to add it here. Recognized devices always have digital pad mapped as axes on Linux if using the To reiterate, even if you set the parameter the module outright ignores it for recognized devices. This is my configuration and I still have digital pad as axes instead of buttons.
Cheers. |
It's possible that #5220 may fix this and detect the DPad as buttons like you were expecting @adam-becker. If you want, you could try it out and see if it will pick up your DPad as buttons after the change. |
# Objective - Enable the `axis_dpad_to_button` gilrs filter to map hats to dpad buttons on supported remotes. - Fixes Leafwing-Studios/leafwing-input-manager#149 - Might have fixed the confusion related to #3229 ## Solution - Enables the `axis_dpad_to_button` filter in `gilrs` which will use it's remote mapping information to see if there are hats mapped to dpads for that remote model. I don't really understand the logic it uses exactly, but it is usually enabled by default in gilrs and I believe it probably leads to more intuitive mapping compared to the current situation of dpad buttons being mapped to an axis. - Removes the `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` enum variants to avoid user confusion. Those variants should never be emitted anyway, for all supported remotes. --- ## Changelog ### Changed - Removed `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` in favor of using `GamepadButtonType::DPad[Up/Down/Left/Right]` instead. ## Migration Guide If your game reads gamepad events or queries the axis state of `GamePadAxisType::DPadX` or `GamePadAxisType::DPadY`, then you must migrate your code to check whether or not the `GamepadButtonType::DPadUp`, `GamepadButtonType::DPadDown`, etc. buttons were pressed instead.
# Objective - Enable the `axis_dpad_to_button` gilrs filter to map hats to dpad buttons on supported remotes. - Fixes Leafwing-Studios/leafwing-input-manager#149 - Might have fixed the confusion related to bevyengine#3229 ## Solution - Enables the `axis_dpad_to_button` filter in `gilrs` which will use it's remote mapping information to see if there are hats mapped to dpads for that remote model. I don't really understand the logic it uses exactly, but it is usually enabled by default in gilrs and I believe it probably leads to more intuitive mapping compared to the current situation of dpad buttons being mapped to an axis. - Removes the `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` enum variants to avoid user confusion. Those variants should never be emitted anyway, for all supported remotes. --- ## Changelog ### Changed - Removed `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` in favor of using `GamepadButtonType::DPad[Up/Down/Left/Right]` instead. ## Migration Guide If your game reads gamepad events or queries the axis state of `GamePadAxisType::DPadX` or `GamePadAxisType::DPadY`, then you must migrate your code to check whether or not the `GamepadButtonType::DPadUp`, `GamepadButtonType::DPadDown`, etc. buttons were pressed instead.
# Objective - Enable the `axis_dpad_to_button` gilrs filter to map hats to dpad buttons on supported remotes. - Fixes Leafwing-Studios/leafwing-input-manager#149 - Might have fixed the confusion related to bevyengine#3229 ## Solution - Enables the `axis_dpad_to_button` filter in `gilrs` which will use it's remote mapping information to see if there are hats mapped to dpads for that remote model. I don't really understand the logic it uses exactly, but it is usually enabled by default in gilrs and I believe it probably leads to more intuitive mapping compared to the current situation of dpad buttons being mapped to an axis. - Removes the `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` enum variants to avoid user confusion. Those variants should never be emitted anyway, for all supported remotes. --- ## Changelog ### Changed - Removed `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` in favor of using `GamepadButtonType::DPad[Up/Down/Left/Right]` instead. ## Migration Guide If your game reads gamepad events or queries the axis state of `GamePadAxisType::DPadX` or `GamePadAxisType::DPadY`, then you must migrate your code to check whether or not the `GamepadButtonType::DPadUp`, `GamepadButtonType::DPadDown`, etc. buttons were pressed instead.
# Objective - Enable the `axis_dpad_to_button` gilrs filter to map hats to dpad buttons on supported remotes. - Fixes Leafwing-Studios/leafwing-input-manager#149 - Might have fixed the confusion related to bevyengine#3229 ## Solution - Enables the `axis_dpad_to_button` filter in `gilrs` which will use it's remote mapping information to see if there are hats mapped to dpads for that remote model. I don't really understand the logic it uses exactly, but it is usually enabled by default in gilrs and I believe it probably leads to more intuitive mapping compared to the current situation of dpad buttons being mapped to an axis. - Removes the `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` enum variants to avoid user confusion. Those variants should never be emitted anyway, for all supported remotes. --- ## Changelog ### Changed - Removed `GamepadAxisType::DPadX` and `GamepadAxisType::DPadY` in favor of using `GamepadButtonType::DPad[Up/Down/Left/Right]` instead. ## Migration Guide If your game reads gamepad events or queries the axis state of `GamePadAxisType::DPadX` or `GamePadAxisType::DPadY`, then you must migrate your code to check whether or not the `GamepadButtonType::DPadUp`, `GamepadButtonType::DPadDown`, etc. buttons were pressed instead.
Bevy version
bab4ee962d88a5576d7f045d22129e8d20645f14
Operating system & version
Host:
Arch Linux
Guest
Debian 10 (rust:buster docker image)
What you did
Here is a (sort of)-minimal repro:
With this code in place, I can press
A
/X
on my gamepad and seejump
/shoot
print to the console, respectively. However, I see nothing print when pressing any of the directional buttons.What you expected to happen
When I press a button, the corresponding
println!
should execute.What actually happened
Nothing happens.
Additional information
The controller in question is rock solid, and works on any steam games and/or emulators.
The text was updated successfully, but these errors were encountered: