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

Bug WebGL Gamepad Y Axis Inverted

Discussion in 'Input System' started by Fenrisul, May 7, 2020.

  1. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    617
    @Rene-Damm

    When building a WebGL app (2019.3.10 x InputSystem 1.0.0 release), the WebGLGamepad is created on first button-press, but its Left Stick Y axis is inverted from regular Gamepad usage! I'm not aware of a global WebGL Gamepad configuration or difference between Firefox, Chrome, etc.

    https://html5gamepad.com/
    Reports input correctly in all browsers I bothered to test.
     
    DDmeow likes this.
  2. NickWinters

    NickWinters

    Joined:
    Dec 6, 2014
    Posts:
    23
    Is there a bug ticket for this that I can upvote?
     
  3. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,068
    I tried this again and could not reproduce this. If you have a reproduction project/scene please do submit a bug report for us to look at. Thank you!
     
  4. NickWinters

    NickWinters

    Joined:
    Dec 6, 2014
    Posts:
    23
  5. Feezen

    Feezen

    Joined:
    Mar 15, 2018
    Posts:
    7
    I have the exact same problem: On a webgl build, the left joystick for a dualshock4 is inverted on the Y axis. It works well in the editor or on windows builds.

    Unity 2019.4.9f1 - Input system 1.0.0 and 1.1.0
     
    PPLorux likes this.
  6. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    130
    I upvoted this bug as well. Also having the exact issue mentioned here. Only happens when testing in the browser.
     
  7. OUTTAHERE

    OUTTAHERE

    Joined:
    Sep 23, 2013
    Posts:
    658
    Bug still persists in 2021.1.16f1

    Workaround is to add an explicit binding for WebGL Gamepad, give it an Invert Vector2 processor, and to move that to above the normal Gamepad bindings.
     
    Last edited: Aug 9, 2021
    Shplog likes this.
  8. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,068
    this is got fixed internally, or rather fixed again for real (hopefully) but takes a bit to trickle down to the public releases
     
    Feezen likes this.
  9. salqadri

    salqadri

    Joined:
    Nov 1, 2013
    Posts:
    7
    Any update on when we can expect the fix? I am facing the issue on Unity 2021.1.20f1.
     
  10. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,068
    It won't get backported to 21.1 but should be fixed in 21.2 when that releases.
     
  11. DDmeow

    DDmeow

    Joined:
    Sep 5, 2020
    Posts:
    15
    Was fixed in 2021.1.5f1 but it's here again in 2021.1.26f1
     
  12. yitz_unity

    yitz_unity

    Joined:
    Jun 22, 2021
    Posts:
    12
    I'm getting a similar bug in 2020.3.12f1. It only happens during menu navigation for the joystick. Normal gameplay is fine and the dpad navigation is fine. Joystick UI navigation is inverted.
     
  13. yitz_unity

    yitz_unity

    Joined:
    Jun 22, 2021
    Posts:
    12
    This has now gone from being inverted, to just not working. The up/down input from the right joystick does nothing during menu navigation. I upgraded to 2021.3.9f and it did not fix the problem.

    Testing in chrome with an Xbox one controller.
     
  14. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,068
    In case it is related to a recent behaviour change which might have implications for your action maps: see https://forum.unity.com/threads/input-system-1-4-1-released.1306062/#post-8368569

    If you are not using the Input System, then just ignore my comment.
     
  15. yitz_unity

    yitz_unity

    Joined:
    Jun 22, 2021
    Posts:
    12
    Sorry, just saw this reply now. Does this mean that if I have the joystick bound to any other controls, it will not also control menu navigation?
    Would disabling the Player Input solve this? Or is one binding overriding the other binding any way?

    By the way I am using different Action Maps for gameplay and menu input.