Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Xbox One controller mapping on PC - How?

Discussion in 'Scripting' started by Teku-Studios, Dec 21, 2015.

  1. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Hi there!

    We're trying to implement XOne controller support for our game on PC, but we can't have it working properly. The documentation seems non-existent, and we are just blind guessing things. After looking for information in forums and blogs, all we've found is that the XOne controller somehow uses the same X360 mapping, but we are running into some issues.

    We can't properly test the input actions since there is some Axis that is constantly giving us values != 0 and the character won't stop moving, and we're guessing that some of the XOne buttons act as triggers, or something like that. But without proper knowledge of how to code this we can't fix anything.

    Can someone help?
     
    Last edited: Dec 21, 2015
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,384
    Honestly, my advice is to just use InControl or something similar that already solves this massive headache for you.

    Well, most of it anyway. Some of the inputs are Axis and some are Button.

    FYI mappings MAC

     
    Last edited: Dec 21, 2015
    Teku-Studios likes this.
  3. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Thanks, we already had this one but Windows seems to work differently :(

    Anyway, we recently came across InControl but we're almost at launch and it's better for us to slightly tweak our system than to completely remake it from scratch with an external asset at this point.
     
  4. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,549
    There is another related thread on this subject:

    http://forum.unity3d.com/threads/xbox-one-controller-issue.366751/#post-2374140
     
    Teku-Studios likes this.
  5. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
  6. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Turns out that this is how to fix it, at least for the Windows 10 bug:

    When going into the controller settings in the control panel to calibrate the controller, there is an option next to calibrate that says "Reset To Default". Click that option. That's it. Feel free to recalibrate after. It also fixed every other issue we had with the XOne controller on Windows 10.

    I hope this helps anyone who has tried all the previous things with no luck. It seems to be more of a Microsoft issue rather than Unity's.
     
    Last edited: Dec 22, 2015
    LaneFox likes this.
  7. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,501
    Microsoft changed the Xbox One driver significantly on Windows 10. The L/R triggers are now separate axes, so you'll have to have a different mapping for users running Windows pre-10 and users running Windows 10+. My input system Rewired can automatically handle this for you.
     
    Teku-Studios likes this.
  8. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Thanks a lot, we'll check it out and see if it wouldn't take us too much to change our input system (we're almost at launch right now).
     
  9. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,549
    I can highly recommend Rewired especially with it native input (raw input/direct input, etc) support on Windows. Having native input support on Windows is a huge plus for me since I never have to worry about issues with unity input impacting me. My main interest was in all of the Flight Simulation controllers that Rewired supports since all of the good ones have more than 20 buttons (Unity input has a limit of 20 buttons) there was no other solution. Been a fan of Rewired since the beta release.

    Actually I would be surprised if there is any other input system (anywhere) that supports as many controllers natively on Windows, Mac and Linux like Rewired does.

    http://guavaman.com/projects/rewired/docs/SupportedControllers.html
     
    Last edited: Dec 24, 2015
    Teku-Studios likes this.
  10. Teku-Studios

    Teku-Studios

    Joined:
    Sep 29, 2012
    Posts:
    257
    Thanks for that feedback :)
     
  11. Deleted User

    Deleted User

    Guest

    Can you tell me the pc version..I missed it...
     
  12. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,380
  13. Heroesflorian

    Heroesflorian

    Joined:
    Jul 17, 2015
    Posts:
    3
  14. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,501
    The mappings are exactly the same on the Xbox One controller in the current, fixed driver in Windows 10 and in all versions of Windows Vista, 7, and 8.