Multi-touch zooming with orthographic camera, what's the possible way to program it?

Hi guys,

Glad to join the community.

I’m developing a orthographic 3d model viewer, and had some trouble with orthographic arc camera’s zooming.

I did some searching and solved mouse-input zooming with ortho camera, but I’m still struggling with handling multi-touch(like with a smart phone) input and achieve zooming with it.

Thanks for any info/tip/idea/code!

A playground:
https://playground.babylonjs.com/#7XF0XZ#1

Let see if @Cedric has some ideas:)

My main question is: what do you get on mobile? Pointer events are meant to be used with mouse or touch so what problem do you see with multi-touch?

Or is it about supporting the pinch to zoom?

Also, can you provide a PG that we can test and modify? it will be easier for us to help you.

Thanks for helping me to make the question more clear.

So what i got on mobile: when there’s two finger touching the screen and I pinch like zooming a picture, nothing happens. Rotation works fine with one finger.

And yes, I want to somehow programm the ortho arc camera so it support the pinch to zoom.

I’ll write a playground shortly and post it here.

Yeah so you will need to detect the pinch manually (hammer.js can do it for you)

Thanks Cedric, I wrote a playground:
https://playground.babylonjs.com/#7XF0XZ#1
I’ll take a look at hammer.js mentioned by Deltakosh. Meanwhile any other idea is welcomed!

Great, I’ll try hammer.js.
Thanks again!