- Home /
Mac xbox controller detect trigger input
Hey, I've set up my xbox controller to work with my mac using the tattie bogle driver and I'm using this page as a reference for the input: http://wiki.unity3d.com/index.php?title=Xbox360Controller (scroll down to bottom for mac version) The only thing that I can't get to work is the triggers. Heres a picture of my input for running: what do I need to do to get it to recognise the left trigger?
[1]: /storage/temp/9855-screen+shot+2013-04-08+at+4.08.36+pm.png
If you mean the triggers, and not the bumpers, then you probably need to monitor axes since they're variable throw inputs.
Answer by Chrisjan89 · Oct 04, 2013 at 03:40 PM
What you need to do for getting the triggers to work is treating them like the analog sticks. You need to change the value for "Type" to "Joystick Axis".
From here I was a little stuck, since I didn't get any values from it. That was because I listened for input if it was a button. Instead treat it like an axis as one should. You can check the output ranges with this code. They go from -1 to 1.
print (Input.GetAxis("Run"));
Im having an odd problem with my trigger range. Yes it goes from -1 to 1, but only once its been pressed. Before the trigger has been touched it sits on 0 (when I think it should be at -1 by default...). Have you experienced this in the past too? what was your workaround?