Mobile Dev from Scratch: Pinch to Zoom
0
0
14 Просмотры·
11/23/19
В
Разное
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”.
Показать больше
0 Комментарии
sort Сортировать по