Search Issue Tracker

Fixed in 5.2.0



Found in


Issue ID




[Full-Screen] Input.mousePosition output does not match the displayed view on the screen



To reproduce the bug follow the steps
1. Open "InputMousePosition" project
2. Open "Test" scene
3. Build & Run
4. Select resolution that is different from Home Resolution of your computer screen
5. Press Play

Unity 5.1.X:

Input.mousePosition will return values that are out of the screen coordinates. User used workaround to get correct position of the mouse.

Unity 5.2.X (black boarders):
Input.mousePosition zero coordinates starts from bottom of black boarders, also input ratio does not fit the graphical view ratio.

Comments (20)

  1. mceier

    Nov 20, 2015 16:35

    Same here - unity 5.2.2f1 on Linux - for fullscreen 1920x1080 coordinates are from X:0 Y:-120,1235 (left-bottom corner) to X:1919 Y:1080 (top-right corner).
    Screenshot of button being clicked while mouse is not above it:

  2. CineTek

    Nov 03, 2015 13:55

    I can approve that this bug still exists and in fact has not been fixed yet!

  3. Strangethink

    Oct 11, 2015 14:26

    Still broken in everything beyond 5.14 for me.

  4. Peter Suwara

    Sep 25, 2015 02:32

    Having the problem with the following :

    Unity 5.2.0f3
    Running in Android Editor
    Set viewport to 16:10 portrait.
    Mouse does not click in correct position on GUI buttons
    Set viewport to 3:2 landscape
    Note mouse clicks on the correct position.

  5. movra

    Sep 24, 2015 18:07

    My comment at SEP 23, 2015 17:49 applied to D3D11 mode.

    In D3D9 mode, using Screen.SetResolution() to change resolution during runtime makes only the UI disappear, not meshes, regardless of Canvas Layer, Canvas Render Mode and Canvas Scaler UI Scale Mode.

  6. movra

    Sep 23, 2015 17:49

    If you use Screen.SetResolution() to increase the resolution, the render will be distorted.

    If you use Screen.SetResolution() to decrease the resolution, the render will only show the background.

    Illustrated here:

  7. godsinmyroom

    Sep 22, 2015 15:08

    Using 5.2.0 here, and installed the patch 5.2.0p1.

    Details about what is happening now:

    - In the full screen the problem was corrected, I can set any of the resolutions available with Screen.SetResolution, the position of the controls is Ok now, as well as input.

    - In windowed mode the bug remains. If I set a new resolution, the input is messed and the UI don't redraw to fit the new size, even using the Canvas Scaler set to Scale With Screen Size. The UI redraws only if I change the screen size using the borders of the screen.

  8. Sheevee

    Sep 17, 2015 19:50

    Same here, Unity 5.2 in Fullscreen mode.

  9. godsinmyroom

    Sep 17, 2015 19:12

    Same problem here with 5.2. When in Fullscreen input stop to work, but works fine in Editor in any resolution.

  10. GDesmoulins

    Sep 14, 2015 21:22

    Same problem on Unity 5.2. Fullscreen mode in an other Ratio than native screen ratio makes display and mouse inputs totally insane...
    Tested with or without NGUI, same problem since 5.01

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.