-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pointer lock cannot be re-acquired after releasing #65
Comments
Just saw this too, was about to file an issue. Wasn't a problem in the past, may have broken due to dependency updates or possibly browser pointer lock API behavior? Not easy to regress since voxel-engine-stackgl was broken until recently by browser WebGL changes (voxel/voxel-shader#11). Maybe related to this other pointer lock issue: voxel/voxel-inventory-hotbar#11 (comment) Workaround: open browser console (View > Developer > JavaScript Console, on Google Chrome), enter: game.shell.pointerLock = true then the pointer-lock can be re-acquired by clicking the game area There was this change new in game-shell 1.3.2: mikolalysenko/game-shell@066c47b Fix presumed typos with Same results on Firefox 43.0.3 and Chrome 47.0.2526.106 |
If pointerLock is enabled, then also enable stickyPointerLock, in order to continuously re-acquire pointer lock. This is needed to re-acquire after pointer lock is released, but if undesirable behavior this default can be overridden with the stickyPointerLock option to voxel-engine-stackgl. Setting this option fixes a regression - previously (circa 2015/4) it was not needed, but now it is required for correct behavior or you cannot "re-enter" the game after exiting (relinquishing pointer lock with Esc). See: voxel/voxelmetaverse#65 Pointer lock cannot be re-acquired after releasing mikolalysenko/game-shell#8 `stickyPointerLock` typos fix
Once the mouse loses focus (e.g if you press escape) you can get back "into" the game
The text was updated successfully, but these errors were encountered: