Unity Community


Results 1 to 5 of 5

  1. Posts
    43

    Unity xbox controller input - left trigger issue

    Hi guys,

    trying to work out how to implement an xbox controller to my game. At the moment, ive simply plugged it in, adjusted the inputs to the required button names etc and it works fine; however have no idea how to implement the left and right triggers - i know they work on a 3rd axis but what do i actually do!?

    Cheers!



  2. Posts
    8

    Definitely a bump!

    We are actually experiencing the same problem here...

    I've found posts that says it's 3rd axis (XBOX?) others that it's 9th or 10th (I think those are for OSX)

    I've tested my XBOX controller outside of Unity and it works fine

    I've tested my controller with XInput.net test plugin made by MIT students and that works with my XBOX controller in Unity... yet I cannot get it to work in my own project...

    No luck!

    The actual how-to to this ought to be written in the sky in letters of fire!


  3. Location
    UK
    Posts
    1,899
    Hi guys got mine working by checking out unity answers.

    It's odd as in it's on the third axis and the one trigger is positive and the other is negative so you can't press both together and have to compensate for the return value!

    My setup for triggers for thruster and fire button.

    Attached Images  


  4. Posts
    1
    I've found posts that says it's 3rd axis (XBOX?) others that it's 9th or 10th (I think those are for OSX)
    You can use the 9th and 10th axis to get the Left and Right trigger respectively.

    I wrote a wrapper class for gamepad input in attempt to circumvent future headaches.
    Gamepad.GetTrigger(Gamepad.Trigger.LeftTrigger);
    You can find it here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •