Ghost events -> dev console open || engine.maxFPS<60

I’ve already raised this case in “Questions”.

Bug appears when dev console is opened in Chrome/Linux/Windows, FF is ok.
@Joe_Kerr succeed to get some same weird behavior (console closed) when setting engine.maxFps<60 (I noticed that the behavior appears when you set maxFps< your screen refresh rate). Bjs 6.49.0 is bug free when maxFps<60, but not the console case.

So start dragging the mouse from one pole to see the correct behavior (dev console closed) :
https://playground.babylonjs.com/#SRZRWV#2135 . Some instances will be created under your pointer.

  • When dev console is opened, instances are created under your pointer, but some are also created near the drag start (ghost events -it seems the opposite alpha- ?).
  • Close the console, and play with engine.maxFps ( beginning of the file), you will see something very near the console open case.

Maybe this is on my side, did I miss something in my camera custom input ? but hey, the dev console open case leaves me perplexed :zany_face: :thinking:

I can reproduce. I’ve seen weird behavior before when the dev console is open in Chrome, so I wouldn’t be surprised if this was another problem…

maxFPS skips frames, it does not adjust the time between frames. Theoretically, maxFPS of 59 should skip 1 frame every second, meaning one frame will take 32ms instead of the standard 16 (rounding, of course. 1000ms / 60fps)
However, pointers are browser-dependent. We register the event listeners and wait for events from the browser, not taking the maxFPS into account. Could it be that this is not taken into account? i.e. - there are frames in which a pointer event was triggered, but the frame was skipped, so the event was processed incorrectly?