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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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