"To show your cursor, press Esc"

Following up on the previous post. A separate issue is that, presumably because of browser security protocols, JavaScript cannot engage pointer lock without the browser explicitly notifying the user like so:

Playground.

To me, pointer lock is a must-have for the user to be able to comfortably pan the camera. Without it, there is extra thinking required to ensure I have enough screen real estate to be able to pan the camera a certain amount before the cursor bumps up against the edge of the canvas, and I find that unacceptable.

But to have pointer lock, the user must be barraged with these notifications every time they pan the camera (and the fullscreen notification wants to say hi when you stop panning, too!)

I first looked for a topic on this forum that might have a solution to the problem, but I couldn’t find one.

I’m not sure if that post’s subject is about the same issue, but that playground has the same notification when entering pointer lock.

Is there a Babylon.js solution to this problem, or is this strictly a browser problem?

Thanks :slightly_smiling_face:

Seems to be more a browser limitation here.

1 Like

Well darn. This is a huge limitation. I want my web app to do everything a standalone application could, but with this annoying notification every time the user pans the camera? Almost ruins the idea entirely.

Is there no way to make this a per-session notification rather than a per-right-click one? The only thing that comes to mind is enabling pointer lock when the page loads, then simulating the cursor :neutral_face:

Perhaps this is a point of discussion for Chromium as a whole?

My solution :rofl:

1 Like

it only does it on the first one for me in chrome on a regular full page (firefox does it every time, and your pg does it every time)