Hasta la próxima

Mobile Dev from Scratch: Pinch to Zoom

7 vistas· 23 Nov 2019
Юрий Антипов
Юрий Антипов
1 Suscriptores
1
En Otro

In this tutorial I will show you how simple it is to create a pinch and zoom script that you can attach to your camera to make it move closer and further away from a scene based on the touch distance between moving fingers on a mobile screen.

The script uses Camera.main to select the camera to move but you could change this to move anything that you put the code on and change the translate to be on this.transform instead of the main camera.

NOTE: If you want to move the main camera with this code, ensure the camera is tagged as “MainCamera”.

Mostrar más

 0 Comentarios sort   Ordenar por


Hasta la próxima