Mousedown and mousemove do not seem to work at the same time while pointerlocked in Firefox. This is likely a bug in Firefox. I was wondering if anyone knew why it occurs or how to fix it?
Repro: https://www.babylonjs-playground.com/#219IXL#151 try to click while moving the camera around in firefox – it’ll freeze while the mouse button is down
I’m making a first person shooter, so clicking and dragging while pointerlocked is common. I tried pointermove and pointerdown, and those work together, but then pointer down events don’t seem to be able to do rightclick+leftclick at the same time (which I also use to aim down sights and shoot). I’m pretty sure regular mousedown and mousemove are supposed to work even in firefox and I almost wonder if it has something to do with which element they’re attached to…or the actual dom contents somehow eating the event before it bubbles.
All of this works fine in chrome and edge as far as I can tell.
The old forum had some discussion on the topic in 2016 + 2018: Problem with Pointer Lock - Questions & Answers - HTML5 Game Devs Forum