Search Issue Tracker
Fixed in 5.2.0
Votes
36
Found in
5.1.2f1
Issue ID
715666
Regression
No
[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.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fix for 6000.0.X: Universal 3D Sample project template takes a very long time to build.
- Crash on RaiseException when terrain detail instancing is excessive
- Prefab variant reference is lost when assigned by click-and-drag in Prefab Editor mode
- Opening any dropdown in Shader Graph stops the Nodes preview but it still plays in the background
- GPU utilization increases when a GameObject is selected
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: http://i.imgur.com/Kl7i2cS.png
CineTek
Nov 03, 2015 13:55
I can approve that this bug still exists and in fact has not been fixed yet!
Strangethink
Oct 11, 2015 14:26
Still broken in everything beyond 5.14 for me.
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.
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.
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: http://forum.unity3d.com/threads/why-does-the-fullscreen-bug-have-no-priority.346839/#post-2308331
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.
Sheevee
Sep 17, 2015 19:50
Same here, Unity 5.2 in Fullscreen mode.
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.
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