Triggers on the 360 controller treated as one axis?

Hi, I've found that I can detect if the triggers on the 360 controller are pressed by looking at the joypad axis value for the 3rd axis on the joypad, however it does not work very well.

The value returned ranges from -1 to 1. If it is one the the right trigger is pressed, if it is -1 the left trigger is press. If no triggers are pressed or both triggers are pressed then the value returned will be zero.

This is no good as it is impossible to tell if both triggers are press or if neither of the triggers are pressed.

Is there a solution to this problem?

In case anyone has problems with this on the Xbox360, you can use Axis 9 for the left trigger and Axis 10 for the right trigger. They both go from 0-1, of course, but you can access them individually. I haven’t actually tested this on PC yet.

You can still access them together using Axis 3 in case you wanted to use them for brake and acceleration like Microsoft intended.

Also, I’m using 3.4.2f2 so it’s possible I’m coming into this so late that the guys over at Unity already addressed this and I’m simply regurgitating that here.

Well what I have done is set up one Input named trigger on axis 3 then invert it and now my left trigger is [0 to -1]and the right trigger is [0 to 1] if that helps.

I thought that the triggers were half axis from 0 to 1 not from -1 to 1 a.

edit ...

here it says that it might be a bug .... forum