Demonstrations


Pinch Zoom In/Out (Touch Input)
Games can take user input from keyboards, joysticks, touch screen and more. Here we are utilizing the touch input to zoom in and out from the map. Input class detect, count and retrieves touches.
​
Here, the resources are downloaded from the website given in the book, a script is written and attached to the Main Camera. Main Camera, which is in orthographic view, detects the touches on the image/screen and then executes the specific action that is to zoom in image or zoom out of the image. Multiple touches going inwards or outwards determines the pinch in and out for the map. Video of a game play, and two screen shots are provided as a part of the demonstration.
Bibiliography
YouTube.com. 2021. Mobile Multi-touch Input - Unity Official Tutorials. [online] Available at: <https://www.youtube.com/watch?v=r0b86C1OuNM> [Accessed 19 February 2021].
​
This reference is selected because the explanation on utilise the touch input is very well done. I did not knew touches were stored in the array and can be retrived from input class get touch function. Simple coding part along with the touch screen is shown for better understanding.
​
Carotenuto, A., 2021. Unity 3D: Working With Touch Input. [online] binPress. Available at: <https://www.binpress.com/unity-3d-working-with-touch-input/> [Accessed 19 February 2021].
​
This reference is selected as it shown with codes and some explanation how single touch and multiple touch input is handles in unity. The author has explained how to detect touch and various touch phases with all the code related to every topic possible.