Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  5. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Xbox Controller issue on HoloLens

Discussion in 'Windows Mixed Reality' started by lpavanat, Dec 6, 2018 at 12:19 PM.

  1. lpavanat

    lpavanat

    Joined:
    Thursday
    Posts:
    2
    Hey guys,

    I am having a really awkward problem with the xbox wireless controller on the HoloLens for a while now, and I have not heard of other people with the same problem. Running on 2018.2.18f1, without extra plugins, just the native Unity solution.

    The axes from the trigger input do not always return the correct value. Many times, the input will return as fully pressed (value 1), and get stuck on this number for a while (can be 1s, can be >10m). This happens for both triggers, including the shared axis, although usually the right trigger seems to be the most frequent one. Sometimes the problem fixes by removing batteries on the controller and connecting again, but others the problem will still persist until I restart the application.

    I have also noticed that the shared axis does not always shows the correct equivalent value of the sum of both triggers (also gets stuck). I have been trying to find a pattern for this problem for quite a while now, and I haven't been able to find a behavior that necessarily causes the problem, although I it seems to be more frequently when I move the controller around (perhaps a bluetooth issue? or could be a random issue and just luck).

    I was never able to reproduce the problem inside the Unity Editor on Windows, using the same controller and bluetooth connection. I have tried 2 different controllers and 2 different HoloLens running different versions of OS. I have tried using .NET and IL2CPP backends.

    I have reported this to Unity (#1104486) but have not heard back yet. Has anyone experienced anything similar and found a solution?
     
  2. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    15
    Hi,

    This is an area I own. I implemented a complete rewrite of UWP's Gamepad handling in the 2018.2 timeframe to fix Left/Right triggers not reporting on independent axes (Microsoft's fault). However, this is the first I've heard about this issue.

    UWP has a completely different implementation for HID and Gamepad devices compared with the Editor and WindowsStandalone (again thanks to Microsoft), and so it's not uncommon for UWP issues like this to go unnoticed; thank you for reporting it.

    I checked the status of the bug, and it's still waiting for QA to repro before sending it to the proper engineering team. Right now 2018.3 bug have higher priority, which may be why it's taking time. However, since it'll eventually come to me I'll go ahead and investigate it.

    A few follow-up questions:
    - What exactly were the HoloLens OS versions you tried?
    - Does this bug repro in 2018.3?
    - Does it repro when running the UWP app on Desktop?
     
  3. lpavanat

    lpavanat

    Joined:
    Thursday
    Posts:
    2
    Hi,

    Thanks for helping me!

    - What exactly were the HoloLens OS versions you tried?
    I am currently running 10.0.17134.345, but I have been having this problem since I started using Unity 2018.2 in June, with the April 2018 update on HoloLens.

    Before that, I was using the previous OS version (I don't really know the exact version) with that "Xbox Controller Input for HoloLens" asset from the store, and the problem did not occur (although the asset broke after the April 2018 update).

    - Does this bug repro in 2018.3?
    Yes, it does. But, as I said, it is quite random. Sometimes I will never get the problem, and others the problem will happen all the time. I noticed this problem because the app I am working on requires users to walk and move the joystick around a lot, and that is when the problem started showing up. If I just use the app while sat in my chair it will not happen (this bugged me for a long time, because I simply could not reproduce the problem).

    - Does it repro when running the UWP app on Desktop?
    No, I could not reproduce it.

    When the problem happens, usually the right trigger and shared trigger get stuck at 1. However, if I press the left trigger all the way, the shared trigger changes to -1 (directly from 1). Another thing I did not mention is that sometimes I press one of the triggers all the way, and unity registers much less (like 0.7 or so, instead of 1). This does not bother me, but might be related.