Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey, thank you so much for sharing this code. It helped me so much on my projects. I had to change the last two lines of your code to get the movement to work smoothly when zooming though. For anyone else that wants to use this with a more smooth pan while they are pinching try these lines:

var drag_vector: Vector2 = event.relative / zoom.x

offset -= drag_vector / 2

Cheers, Dan

Thank you for the improvement.

Happy that it helped ;)