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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.