Search Issue Tracker
Not Reproducible
Votes
4
Found in
5.4.0f3
Issue ID
823895
Regression
No
CursorLockMode.Confined stuck and jitters in editor.
Steps to reproduce:
1. Open project "CursorLockMode.zip"
2. Open "Cursor" scene
3. Enter play mode
4. Press TAB twice to enter CursorLockMode.Confined mode.
5. Move the mouse.
6. Press ESC to unstuck the mouse.
Expected behaviour: Mouse cursor confined to game window
Actual behaviour: Mouse cursor stuck in the middle of the screen, jitters if mouse is moved.
Reproduced on: 5.2.4f1, 5.3.6p3, 5.4.0p2, 5.5.0a6.
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
MamaCatDev
Apr 09, 2019 17:21
How is this not reproducible? It's an issue with literally every project I've had when I need to switch between lockstates while in the Editor Play. Really wish we had a fix for this.
Djeymusic
Mar 11, 2019 11:05
Same issue in 2018.3.6f1.
Cursor.lockState = CursorLockMode.Confined; makes the cursor being stuck in the middle of the game window and jittering.
Not tested in build.
collinpatrick15
Jul 28, 2018 02:55
Why is this still an issue in 2018? Yeah, it works properly when you build the project but its a nuisance having to press esc every time I want to get my cursor unstuck in the editor.
daisySa
Mar 06, 2017 06:02
Thanks for the tip Dagonmar, it helped us out in 5.5.0f3.
dagonmar
Oct 02, 2016 17:30
It's worth mentioning that I was able to unstick the cursor by setting Cursor.lockState to CursorLockMode.None right before set it to CursorLockMode.Confined. After this, the cursor was in the Confined state again, but no longer stuck to the center and jittering. I hope this helps others with the same issue and helps nail down the cause of the bug.