Emulate pinch zoom on chrome

I’m trying to test my code for pinch zoom using chrome’s developer tools (via toggle device toolbar) for touch devices. On mobile, the doc’s arc rotate camera’s example (https://playground.babylonjs.com/#SRZRWV#839) works fine. When I pinch, the camera’s zoom kicks in. On PC, when I use the developer tools and activate shift+left mouse click to emulate the pinch, the cursor switches to the cross (which is correct) but the zoom does not kick in when I move the mouse up/down. Instead it just pans.

My question: are the bjs camera inputs ingesting the browser’s emulated gesture evts?

@amoebachant do you know? It wasn’t obvious to me from a quick look.

@phaselock, it looks like Chrome doesn’t actually send multiple touch events when using shift-drag in the emulator. Babylon is expecting multiple touch points for pinch operations. A quick search shows that some people use hammerjs for simulating multi-touch - that or another similar tool may be helpful. Thanks!

I see, got it ! Thanks.

Weirdly enuff, hammer is no longer maintained and I was told to use native browser dev tools for developing with touch devices. It seems that :hammer: was developed as a stopgap, now that browsers have caught up, its no longer needed. :man_shrugging: