Search Issue Tracker
Feature Request
Votes
0
Found in [Package]
0.1.2-preview
1.0.2
1.4.3
Issue ID
ISXB-331
Regression
No
Mouse delta events not captured on Android + Meta Quest when reaching the boundary of invisible Android "screen space"
Reproduction steps:
# Open the user’s attached project (“UnityInputSystemMouseBug.zip”)
# Build And Run on an Oculus Quest device
# Connect a mouse through Bluetooth or USB-C adapter
# Keep moving the mouse to the right
Expected result: The MousePos increases infinitely
Actual result: The MousePos stops increasing
Reproducible with: 0.1.2-preview(2020.3.41f1), 1.0.2 (2021.1.12f1), 1.4.3(2022.1.21f1, 2022.2.0b12, 2023.1.0a16)
Reproducible with devices:
VLNQA00379, Oculus (Quest 2), Android 10, CPU: Snapdragon XR2, GPU: Adreno (TM) 650
Reproduced on: Windows 10 Enterprise 21H2
Notes:
* Locking the cursor’s position should fix the behavior, but it does not as the Cursor.lockState has no effect on Android in XR (See the commented code at /Assets/Scripts/MousePrintOut.cs line 50)
* This mouse behavior does not exist on any other platform (Desktop Windows, UWP on HoloLens, Windows MR, SteamVR), except on Quest+Android.
* This issue has been reported on the forums here: [https://forum.unity.com/threads/mouse-deltas-clamped-to-window-on-android.1296495/|https://forum.unity.com/threads/mouse-deltas-clamped-to-window-on-android.1296495/]
* The project uses OpenXR Plugin version 1.5.3
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
- Prefab override popup is cropped/positioned incorrectly when more than one display is used and a higher display Scale is set
- Opening a dropdown on a small screen results in its instant closing when mouse cursor is pressed where the dropdown is going to be opened
- Only "ArgumentNullException: Value cannot be null" is displayed instead of all the actual errors when opening a project with numerous compilation errors
- MultiColumnListView and MultiColumnTreeView do not change selection on first input when focus is set by code
- SerializedProperty.DataEquals is returning false when SerializedProperty.EqualContents return true
Resolution Note:
The problem is related to Android platform not having any implementation to support feature "Cursor lock", e.g. "https://docs.unity3d.com/ScriptReference/Cursor-lockState.html".
A workaround was implemented to get mouse deltas for this use-case by extending UnityPlayerActivity and overriding dispatchGenericMotionEvent and dispatchTouchEvent to capture mouse velocities.
MotionEvents are injected back into the Unity activity so that Input System continues to work normally.
In order to get this to work as expected without additional effort "cursor lock" support and capture based mouse delta tracking needs to be implemented for Android which have been filed in Product Board as a feature request: https://unity.productboard.com/insights/notes/view/7046-unprocessed/notes/28091572