Search Unity

Xbox One Pad Win 7: issue with going from wired to wireless AND a question on in game control config

Discussion in 'Editor & General Support' started by esco1979, May 8, 2017.

  1. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    Hey, everyone, I've been having a weird issue when going from wired to wireless and using an Xbox One Controller in Unity. While using it with a wire the cross pad buttons are linked to axis 6 for horizontal and axis 7 for vertical. BUT if I go wireless, I have to change the input settings in input manager to Axis 7 for horizontal and Axis 8 for Vertical for them to work. Why is this?

    My other question is how can I set the game up so that I can give the user the option of configuring their own controls? I looked under the information I have for Input in the help files but there doesn't seem to be a way to read which individual button is being pressed on the pad/keyboard or a way to actually change the key/pad bindings programmatically. It seems that the only options available are input manager or that lousy little key config that can be set to come up before the game runs. I wanted to develop an in-game menu for the player to setup keyboard key controls and pad controls like you see in normal every day games. And I missing something here?

    EDIT: not sure if it matters but I'm using Windows 7.
     
  2. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    I can't be the only one with this issue.... what's up?
     
  3. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    You are definitely no the first person to run into these issues. That is why I do not use Unity's input system at all. I got tired of all of those issues very quickly.

    I used the third party tool called Rewired for my input handling. More information can be found here/
    https://www.assetstore.unity3d.com/en/#!/content/21676

    It supports tons of controllers see the full list here. Xbox One Controllers (wired and wireless).

    http://guavaman.com/projects/rewired/docs/SupportedControllers.html

    For remapping controllers I use Rewired's Control Mapper so my end users can remap keyboard/mouse/game controllers within my game. More information can found here.

    http://guavaman.com/projects/rewired/docs/ControlMapper.html

    Free trial version available so you can perform your own evaluation and see if it works for you.
    http://guavaman.com/projects/rewired/trial.html
     
    guavaman likes this.
  4. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    Thanks for the info, but I'm already aware of rewired. I would rather not have to spend $45 to fix this. Plus the fact that the Unity developers are working on a new input system.

    I WOULD like to know why exactly the bug I'm seeing happens though.
     
  5. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Do you have all of the latest updates installed for Windows 7?

    Might not be a bug as such but just a difference in who wrote the driver for wired vs wireless. The USB driver model is a bit different on Windows 7 compared to 8.1 and 10 so that has some impact also.

    That sounds like a windows driver issue to me with the differences between wired and wireless. There are similar differences from time to time on Windows 10. One Windows 10 Microsoft driver updates have really given quite a few headaches for the XBOX ONE controller (and that impacted everyone not just Unity). The Microsoft windows 10 summer 2016 update was one of the updates that caused everyone headaches with XBOX ONE controller.

    Generally I am immune from these issues since I use Rewired.

    The Rewired trial version is free and you can evaluate it as along as you like. You can at least test it with Rewired trial version and see if you still run into the issue or not. At least you can get an answer if there is a solution or you have to do more digging with looking at driver updates from Microsoft. At least you can get an answer while waiting for Unity's new input system.
     
  6. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    I own a ton of assets from the asset store, and Rewired is the only truly "must have" one I can think of. It takes one of the weakest areas of Unity and not only fixes it, but goes way above and beyond. To the point where I doubt even the new official Unity input solution will be able to touch it. Plus, who knows how long it will take for that to be available. The GUI system was in limbo for several years, for instance.
     
    guavaman likes this.
  7. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    Yes, I have all the updates installed. I will say that the Xbox one controller has been nothing but a pain in the ass since I got it. It seems to have issues everywhere I look in one form or another. Which is a shame considering how well built the actual controller itself is (with the exception of the port you connect the USB cord to).

    And yes it's a shame that Unity's input controls suck. And quite shocking since that is one of the MOST pivotal things in a game. But I'm getting the impression here that my issue isn't one with a solution other than to use something else for my controls besides unity's default input ones.

    I'm still curious to see what Unity's new input system will be like. Here's hoping it's one of those things that happens sooner, rather than later. Though, judging by the developer's complete silence in this thread (and just about every other one I see discussing normal controller issues) I wouldn't be surprised if it was still VERY far off. But c'est la vie.
     
  8. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551

    Having all of the updates rules helps narrow it down. Did you file a Unity bug report yet?

    Your case is more interesting since wired vs wireless problem. I would be interested in your results with Rewired Trial version to see if this is a new problem or not for XBOX ONE on Windows 7. Since Rewired has its own native input handling then at least you will have a point of reference so when you get the new Unity input system. Then at least you will be able to say it broken only for this input handling method or broken for everyone.

    Here for example is some issues for XBOX ONE mentioned on the Rewired site for Windows 10 with Unity input due to Microsoft changes. It sounds like the same type of issue you are facing on Windows 7 when using Unity input.

    http://guavaman.com/projects/rewire...#windows-fallback-xbox-one-controller-mapping

    Windows Standalone (Unity Fallback, Windows 10): XBox One controller has incorrect mapping
    Microsoft changed the XBox One driver in Windows 10 and changed the mappings compared to Windows 7 and prior versions, then after the Windows 10 Anniversary Update, they reverted this driver change. When using Unity fallback as the input source, it is impossible to differentiate the XBox One controller on Windows 10 pre and post Anniversary Update. Therefore, the decision was made to support only the newest mapping. Xbox One Controllers will have incorrect mappings on Windows 10 prior to the Anniversary Update.

    This is not an issue when using Raw Input, Direct Input, or XInput. It is advised that you do not use UnityEngine fallback input as the input source on the Windows Standalone platform due to this and many, many other issues.
     
  9. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,625
    It sounds like the exact same thing that happened with their Windows 10 XBox One drivers. They inadvertently changed the axis layout and exposed separate trigger axes instead of the existing layout they had for 10+ years since the 360 controller came out. They reverted this after about a year and a half in another driver update. I hadn't heard any issues on Windows 7, but that may be specific to the wireless adapter. Unity uses a hybrid Raw Input + XInput system on XInput-compatible controllers, so a change in the Raw Input mappings will affect it. XInput alone likely won't have any issue.

    If you don't want to use a 3rd party input plugin, the best I can suggest is to use XInput directly. This is the only way you will be able to avoid most of the pitfalls with Xbox One drivers. MS seems to test XInput but not Raw or Direct Input when they release driver updates. Here is a free XInput wrapper for .NET. Be advised it only supports XInput-compatible gamepads such as X360, XBone, and clones.
     
    Last edited: May 15, 2017