enterPointerlock() and exitPointerlock() causing bugs on Firefox and Safari

I’m getting a bug that when exitPointerlock() the camera will rotate off on it’s own in Firefox, you are able to see here: Babylon.js Playground

Before in my code I had:

            this.scene.onPointerDown = () => {

            this.scene.onPointerUp = () => {

But that would lock the cursor and wouldn’t allow me to rotate the controller. Any ideas?

I see no errors… can you copy/paste the console outputs?

Sorry Weird, I was in such a rush that I should have been more specific. Added what I needed to the top,

I’m facing a similar problem on Chromium: engine.enterPointerlock() seems to have no effect: engine.isPointerLock is always false. The same script works on Chrome.

It is probably a chromium issue then as it now works in the other browsers ??? do you have pointer lock working ok outstide of babylon in Chromium ?

Yes, i’ve just verified that. It’s a Chromium issue.
I’ll open an issue on their support forum.

1 Like

To confirm that, here it is their reply: CEF Forum • pointerLockApi issue
Maybe can be useful to other people facing the same issue :wink:

1 Like