We’ve worked from the Binding Commands to Triggers and gotten it to work fine with the button enum. But we’d like to use the triggers and I don’t understand why they’re not part of the enum.
I see there’s a getTriggerAxis() method, where you pass in the Left or Right Hand, but it returns a double - how do you use that double result to start a command? I just need a boolean, on/off, not a range
The triggers on an xbox controller (or similar gamepad device) are analog values like the thumb sticks commonly used for driving. They don’t return a boolean (true/false… pressed/not pressed) value, and instead return a range of possible values.
There are numerous code examples on how to do it posted here by teams, but the most common is to simply check the trigger value against a threshold(i.e. >= 0.5). I believe most teams extend the Button class (just like how JoystickButton does) and add the check there. Then you can use it like any other button. Sorry my advice isn’t more specific, I’m not in front of the code at the moment.