Search Unity

XboxOne Bluetooth Controller Input on Mac

Discussion in 'Editor & General Support' started by sphyerion, Sep 10, 2017.

  1. sphyerion

    sphyerion

    Joined:
    Aug 22, 2014
    Posts:
    6
    Hello,

    It looks like Unity is not correctly detecting input from my XboxOne Controller connected via Bluetooth to my mac.

    Specifically, the Trigger Inputs are not available through Unity's Input API.

    OSX 10.12.3
    Unity 2017.1.1f1
    1 Xbox Wireless Controller (STANDARD GAMEPAD Vendor: 045e Product: 02fd)

    Using http://html5gamepad.com/ I can confirm my controller is in fact connected, and when pulling the Triggers, B6 and B7 are analog buttons transitioning from 0 to 1.

    I've tried every possible unity Input button name/axis whatever I can think of, and I cannot detect the trigger input.

    Is this possibly somewhere where Unity is not correctly detecting that input and exposing it via the Input API?


    Thanks
     
    Last edited: Sep 10, 2017
  2. sphyerion

    sphyerion

    Joined:
    Aug 22, 2014
    Posts:
    6
  3. sphyerion

    sphyerion

    Joined:
    Aug 22, 2014
    Posts:
    6
    Anyone able to help me with this issue?
     
  4. LucianBlack

    LucianBlack

    Joined:
    Sep 28, 2017
    Posts:
    48
    I am looking for the same.
     
  5. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
    I once though it was because of the different mapping across platform and figured out it was true. However, I don't think that is the main problem, as I succeed to control by a Bluetooth Xbox One controller in 2017.3 but failed in 2018
     
  6. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
    Just find the solution. First, in input menu, check whether you have choose Joystick Axis for Type. It is just one of the several silly mistakes. Secondly, look at the sensitivity and set it to 1 or somewhat value instead of 0. I got the problem simply because Sensitivity is initially 0 when created.

    However, the mapping for direction pad are axis instead of buttons, and the reaction is quite weird. Meanwhile, I still can't find any mappings for the two trigger buttons(LT\RT). I have tried all of the axis and JoystickButton, just ... none. Some said in Windows it is axis, but it is only rubbish on OS X.

    By the way, the os version is 10.12
     
    Last edited: Jun 7, 2018
  7. MackNugget

    MackNugget

    Joined:
    Dec 4, 2012
    Posts:
    40
    Anyone have a link to an Xbox One controller map for mac?
     
  8. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
    The maps for the controller are different via Bluetooth or wired. For the Bluetooth one, it seems Unity does not receive any input from triggers. And for the wired one, I've tried two Xbox One controllers, and each of them has different mappings. Weird.
     
  9. MackNugget

    MackNugget

    Joined:
    Dec 4, 2012
    Posts:
    40
    That would make sense. I was able to get feedback from the bumpers, but couldn't for the triggers or the Start/Select buttons (or whatever Xbox calls them). I have been trying to map it for the bluetooth settings.
     
  10. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
    Well, I think for the start.select buttons, they have the mappings
     
  11. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    89
    Here's a mapping I've tested on my device. I wrote it in Chinese, but I think you could get it.

    左摇杆

    水平 = X axis
    垂直 = Y axis
    按下 = JoystickButton14

    右摇杆

    水平 = 3rd axis
    垂直 = 4th axis
    按下 = JoystickButton15

    按键 屏幕 = JoystickButton16
    按键 列表 = JoystickButton12
    按键 A = JoystickButton1
    按键 B = JoystickButton2
    按键 X = JoystickButton4
    按键 Y = JoystickButton5
    按键 LB = JoystickButton7
    按键 RB = JoystickButton8

    板机 LT =
    板机 RT =



    十字键
    水平 = 6th axis
    垂直 = 5th axis
     
  12. _spacemonkey_

    _spacemonkey_

    Joined:
    Aug 11, 2014
    Posts:
    8
    I had the same issue some time ago. It was the reason I returned my xbox one s controller. Does anyone know if this is fixed? (latest Unity version at time of writing: 2019.2.14)
     
  13. DebugLogError

    DebugLogError

    Joined:
    Jul 24, 2013
    Posts:
    59
    I'm on 2019.3.13f1. Not getting any input from the triggers when connected via Bluetooth.
     
  14. MackNugget

    MackNugget

    Joined:
    Dec 4, 2012
    Posts:
    40
    @FlockingBehavior and for anyone else trying to do this, I was able to get my Mac to use the Xbox controller using the new Input System. It makes it a lot more simpler to setup and use. Plus now it works for Mac and PC.
     
    idbrii, closingiris and DebugLogError like this.
  15. DebugLogError

    DebugLogError

    Joined:
    Jul 24, 2013
    Posts:
    59
    Thanks for the heads up! I switched to the new input system after reading your comment and the triggers are working with Bluetooth (even without the 360 drivers installed).
     
    closingiris and MackNugget like this.