Loading...

Следующее


Mobile Dev from Scratch: Pinch to Zoom

1 Просмотры
Юрий Антипов
1
Опубликован в 23 Nov 2019 / В Разное

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 Сортировать по

Следующее