Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.3.31f1

2022.2.0f1

2022.3.13f1

2023.1.20f1

2023.3.0a15

Issue ID

UUM-56527

Regression

No

Input.mousePosition returns incorrect values when entering Play mode with the Game view unfocused

--

-

How to reproduce:
1. Open the attached “incorrect_mouseposition.zip” project
2. Open the SampleScene
3. Make sure the Game window is set to “Play Unfocused”
4. Enter the Scene window or any other window on the same toolbar as the Game window
5, Enter Play mode
6. Observe the values returned by the Input.mousePosition function in the Console

Expected result: The function returns the cursor position in pixel coordinates
Actual result: The function returns the cursor’s X and Y position as infinity

Reproducible in: 2021.3.31f1, 2022.3.13f1, 2023.1.20f1, 2023.2.0f1, 2023.3.0a15

Reproducible on: Windows 10, Windows 11
Not reproducible on: No other environments tested

  1. Resolution Note:

    Thank you for reporting a bug to Unity.

    We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.

    Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.

    WORKAROUND NOTE: The bug appears to be exclusive to the old Input Manager and not present in the new Input System, you can use Input System's Mouse.current callback to workaround this issue (https://docs.unity3d.com/Packages/com.unity.inputsystem@1.8/manual/Mouse.html)

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.