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.
Comments (5)
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
- Render Pipeline Converter selected asset counter reports one fewer item when using manual selection
- [Android] [Adreno] [WebGL] A light cookie is not rendered with shader compile error when WebGL build is launched on a device with Adreno GPU
- Rigibody sliding over a flat surface that is made of several GameObjects detects false collisions when Collision Detection is set to "Continuous" or "Continuous Dynamic"
- UI Toolkit Label height is incorrectly calculated when using max-width with percentage value
- Visual Effect Material causes Scene view to update continuously when both Scene and Game views are open, despite "Always Refresh" being disabled
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.