Search Issue Tracker
Fixed
Fixed in 6000.0.61f1, 6000.2.9f1, 6000.3.0b7, 6000.4.0a3
Votes
5
Found in
6000.0.58f1
6000.2.6f1
6000.3.0b4
6000.4.0a2
Issue ID
UUM-121296
Regression
No
The mouse position is not updated when the "Mouse.WarpCursorPosition" function is executed
How to reproduce:
1. Open the "WarpMousePosition.zip" project
2. Open the "SampleScene"
3. Enter Play Mode
4. Click the Left mouse button anywhere on the Game view
5. Observe the mouse moving to the center-opposite side of the Game view and the Console logging the from-to positions
6. Click the Left mouse without having moved the mouse in the Game view
7. Observe the Game view and Console
Expected results: The mouse changes position in the Game view and flipped coordinates are logged in the Console
Actual results: The mouse does not change position and the Console logs the same coordinates on every click
Reproducible in: 1.6.3; 1.8.1 (2021.3.40f1, 2022.3.37f1), 1.8.2 (2021.3.40f1, 2022.3.37f1, 6000.0.10f1)
Reproduced on: macOS 14.5 (Intel)
Not reproduced on: Windows 11 Pro (23H2), No other environment tested
Note: On the first click, the mouse warps, on the second and later clicks it does not anymore
Comments (2)
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
GameMechanics
Dec 03, 2024 18:29
Since it requires a mouse, Windows and MacOS are most of the scenarios. I guess you could test WebGL and Linux as well. This needs to be fixed. It looks really ugly and I have not found a work around short of rewriting major chunks of Unity including their EventSystem.
Why isn't MacOS keeping up?
GameMechanics
Nov 14, 2024 17:29
I kept the hardware mouse visible and strangely, it does move. The problem is no one acknowledges the move until you go to move the mouse. Any movement of the mouse updates everything to the warped to spot.
If I were to guess without ever seeing the code, the WarpCursorPosition() routine just needs to set the Mouse.current.delta Vector2 and that would fix it. Or set a flag that the mouse has moved and check the flag when testing the delta.
Regardless, this should be a small fix and it is really ugly on the Mac. My Windows code runs beautifully.