(How To) Pinch to Zoom

Does anyone have any example blueprints on how to get pinch to zoom to work? I can’t seem to figure it out. I have it so I can scroll the mouse wheel to zoom in and out, but how do I utilize the pinch gesture on a mobile device?

I’m still working on it but here’s what I’ve got so far.

1 Like

This is what i came up with using touchinputstate x and y difference for pinch zooming. But it zoom in to the center of the screen. I want it to zoom in to center of my fingers naturally. Its hard to test it in a pc without multi touch capabilities really. Hope someone would get inspiration from this and make it better…

I know this is an older thread but it got me on the right track so I thought I’d post my solution. I used necival’s solution as a base starting point. I found that zooming in worked really well with it but zooming out didn’t work so well. So I decided to basically normalize the pinch axis value between -1 and 1. However, this is tricky because anything greater than 1 is considered zooming in. So, I had to do two separate normalizations but the Zoom calculations could stay the same.

The above picture where the pop is blocking the node is a subtraction node

Thanks a lot for the good exsample.
I found the AxisValue PinchTouch return is not distance of two finger touch Location.
I’d like to know the definition of AxisValue

2 Likes

I have made my own Zoom with Zoom In and Out without releasing a second finger.
Camera Zoom speed I left 20 as it works best for me.

1 Like

Hi how are you , Please send this nod or make video i make it but doesn’t work, Thanks.

Hi @YusufAnubis,

Which nod are we talking about?

Also this code is for UE4 and I have not check it on UE5

BR.