Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Mouse position Y coordinate is inverted

Discussion in 'Input System' started by MrAkroMenToS, Apr 17, 2019.

  1. MrAkroMenToS

    MrAkroMenToS

    Joined:
    Nov 16, 2013
    Posts:
    41
    The mouse's 'position' vector seems to be 'inverted' in the WebGL build. There was an unrelated issue https://github.com/Unity-Technologies/InputSystem/issues/377 in this thread: https://forum.unity.com/threads/mouse-position-webgl.612355/, but the GIF there shows exactly what I am talking about:


    When the mouse is being pulled down you can see the red arrows going up, and on the right the mouse position goes to (0,0) when the mouse goes to the upper left of the screen.

    In standalone build (both with old Input.mousePosition and the new Input System) and in WebGL only with Input.mousePosition the (0,0) of the screen is the bottom left corner.

    Am I missing something (is there a setting for this?), is this an intentional change or a bug?
     
  2. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    I just found this out too. Very strange. Seems like a bug. Did you ever find a solution?
     
  3. douglassophies

    douglassophies

    Joined:
    Jun 17, 2012
    Posts:
    141
    Yep, inverted for me as well.
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    This is a known bug, and should be fixed in 19.3
     
  5. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    Upgrading to 19.3 did seems to fix it for me. However a friend playing the same build but on a Linux computer still had inverted controls. For me on Windows it seems fine now. Could someone with a Linux install double check this?
     
    JoeStrout likes this.