question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pointer lock controls error unlocking

See original GitHub issue
Description of the problem

Pointer lock controls on the examples page throw an error after activating pointer lock, deactivating pointer lock, and reactivating pinter lock. This can cause the camera to also jump around to a random location.

To reproduce:

  1. Click on the text saying ‘Click To Play’
  2. Press ‘escape’ on your keyboard to unlock the controls
  3. Click on any part of the page other than ‘Click To Play’

THREE.PointerLockControls: Unable to use Pointer Lock API

Three.js version
  • r120
Browser
  • All of them

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

3reactions
Mugen87commented, Sep 19, 2020

This is now the leading issue at the Chromium bug tracker:

https://bugs.chromium.org/p/chromium/issues/detail?id=1127223

Since the current Chromium implementation is quite annoying for users, I would appreciate if everyone could upvote/star the issue in order to give it a higher priority 😇 .

2reactions
Mugen87commented, Oct 29, 2020

The Chromium bug is now marked as fixed although the lock/unlock issue is not fully mitigated. The browser just decreased the time frame in which a unlock/lock is considered to be invalid. It’s now 1.25 seconds instead of 2. I’ve mentioned at bugs.chromium.org that this solution is not satisfying however I’m not sure if the security policy will be reconsidered. If you are also affected by this issue, please request at the following site for a change:

https://bugs.chromium.org/p/chromium/issues/detail?id=1127223

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to avoid PointerLockControls error - three.js forum
I solve this problem by delaying the display of the button that re-enables pointer lock mode. It's worked as intended every time I...
Read more >
Pointer Lock API - MDN Web Docs
The Pointer Lock API (formerly called Mouse Lock API) provides input methods based on the movement of the mouse over time (i.e., deltas), ......
Read more >
THREE.PointerLockControls doesn't lock my pointer
I am using imported three.js and cannon.js, from node package manager. I am trying to get the controls to be like an fps,...
Read more >
Pointer lock and first person shooter controls - web.dev
Inside your pointerlockchange callback you must check if the pointer has just been locked or unlocked. Determining if pointer lock was enabled ...
Read more >
Pointer Lock Controls - Cocos Creator
On the click on screen, we get pointerlock, with esc be unlock the pointerlock. There is problem if try to lock the pointer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found