How do I reconcile the fact that on Mac, the right trigger of an Xbox 360 controller returns a value of “0” when the game first begins, but the trigger axis itself is not being pressed and should initialise with a value of “-1”.
Currently, I have to press the button once, then release it, then it gives me the proper -1 value. But when the game first starts, it’s giving me the wrong value.
I want my character to jetpack around, and I’m trying to use the right trigger to return a value from 0 to 1.
I do a Math.Lerp to get the right trigger (on Mac this is called Axis 6) to turn the -1 to +1 range to a 0 to 1 range.
It all works great, except that when I start the game, my character immediately starts using their jetpack, because the controller says that the triggers are at position “0”, when actually, they’re at position “-1”, because they’re not being pressed.
Once I press the triggers, they reset properly, and give values -1. I just don’t know how to force the controller to give a proper -1 reading at game startup! Any ideas?
- Murray