Hello, everyone. I triggered the pointerlockcontrols control by click the event, and everything started to work well. But when I press the ESC key to exit and click to trigger pointerlockcontrols again, pointerlockcontrols will throw a pointerlockerror exception. After consulting the relevant API, I can’t find any reason. Have you ever had a similar situation?
You can view it directly through the official website link console.
windows and Google Chrome 85.0.4183.83 version.There is no problem in entering for the first time. When I exit ESC and click again, there will be an exception. I don’t know if it is the reason after the browser is upgraded!
I have Chrome 85.0.4183.83 and indeed, sites that worked fine before now take a random amount of requests (which raise the error “THREE.PointerLockControls: Unable to use Pointer Lock API”) to trigger the pointerlock again after having exited it once.
Just to give an update for anyone viewing this in 2021 onwards, the above Chromium bug was merged into an existing one. There was apparently an intentional 2 second timeout implemented between pointer locks to prevent abuse, and they ended up compromising by lowering it to 1.25 seconds instead. That’s where I believe it still is today.