- Home /
XBox Controller Button Pressure?
Hi guys, just need to find this out quickly as I cannot find any information whatsoever on this subject.
Is it possible for me to determine how hard a player presses the "Y" button for example. To expand on this point, say I had a racing game and when I pressed the "Y" button, the car accelerated. Dependent on how hard I pressed the button determines how fast the car accelerates.
Is it possible to do this? I have used something similar for analogue controllers in the past but cannot find any documentation on other input methods. Any guidance/help is much appreciated.
I'd love to know that as well. Though for a car i'd prefer the triggers, you know to emulate the left and right pedals ins$$anonymous$$d of my thumbs doing the work. But yeah, i remember Gran Turismo 4 on the PS2 doing that with the face buttons.
Answer by Binary42 · Mar 04, 2014 at 01:12 PM
The Y, X, A, B and Bumper Buttons are digital so you won't be able to detect how hard they're pressed. You can get analog input for the sticks and the triggers (RT & LT) though.
Seriously?! The original XBox had pressure sensitive face buttons, and they removed it for 360? :/
Yes, the PS3 controller still has them, the PS4 not. A rarely used feature. I guess one of the reasons for removing them was that making a button that has a good haptic feedback is nearly impossible when it needs to be pressure sensitive too. There are very few games that did use this feature.
Actually, physically the XBox 360 controllers also have pressure based exposed values, but there are 2 issues co$$anonymous$$g from the hardware : - Some official models have a reverse pressure feature (clipping) as it allow faster "release time" of the button. It make it extremely hard to allow the button to be slightly pressed between the 0.01 and 0.5 values (out of 1 being fully pressed). - For some reason, the Windows native plugin for the 360 controller (of course distributed by Windows used within Unity) only recognize raw data of the button (meaning 0 and 1). This is why Unity recognize it only as booleans values.
In the Xbox 360, there are games that make uses of the button pressure, but as I previously mentioned, due to the "clipping" feature of the buttons, it's much more problematic so it's really not a popular features even when available.
This have made many XBox 360 ported game on PC with button-pression issues. So, for now, it's not natively possible to have button pressure in Unity. It would require an update of the Xbox 360 controller plugin + an update of the Unity's input recognition. (Then imagine how many game projects out there that have been made with buttons being booleans that would have their inputs updated. It would be an hell).