Why is the xbox trigger an axis and not a button like the bumper. What value is being measured? Depth of press?
Yup. The trigger is an analog input. This is really handy actually, it lets you use it as an input for throttle or steering if you want.
If you want to observe this you can go into the Driver Station and go to the 4th tab on the left (usb) and observe how it works when the trigger is pulled
Think of driving games.
It’s a throttle, so how far you pull it determines the input. That makes it much more of an axis than a button.
you would only read positive values from 0 to 1. Also if you want you can make the trigger be like a button if you are in need of more buttons.
That trigger is why xbox controllers are preffered for racing games than the ps4.
We use the triggers as our throttle (left trigger is fwd, right trigger is rev).
For our operator we can also use different value ranges on the trigger to do different things. Such as trigger less than 50% pulled and a button press does something different than trigger fully pulled and a button press.
I play PS4 at home so yeah, that makes sense.
What kind of actions last year did you use that for? Seems like a good way to get extra buttons if you run out, is it easy in the heat of a match for the operator to do?
Here is our OI class from last year, you can see all the conditionals and thresholds we used last season.