Firefox and Safari enterPointerlock() issue when trying to rotate player

I’ve asked this before but hoping there’s been a fix.

I’m working in Safari and Firefox and I have it so when the user left clicks in the scene I fire off a onPointerDown and the mouse movement then controls the rotation of the first person controls rotation.
On Firefox and Safari it locks the cursor so I’m unable to control rotation:

Is there any way to get around this at the moment?

Hum…maybe a repro will help us figure out what is the issue :slight_smile:

I’ll get that up, thanks.

1 Like

@Deltakosh You can try to use this is either Safari or Firefox, (works in Chrome): https://www.babylonjs-playground.com/#SRZRWV#10

Ok I see…Actually Firefox and Safari are a bit picky regarding events :slight_smile:
here is your fix:
https://www.babylonjs-playground.com/#SRZRWV#31

Check lines #17 and #18

3 Likes

Amazing! Thank you so much!