Multi-touch input
Touchscreen devices generally have the ability to access multiple touches. The most common usage of multi-touch allows the player to pinch to zoom. Accessing multi-touch is pretty easy. You access touches with Input.GetTouch(index)
, where the index
represents the index of the touch, with the first touch occurring at index 0
. From there, you can access information pretty much in the same way as accessing information about a mouse.
You can also find out how many total touches are occurring with Input.touchCount
.
Note
You can find an example of how to implement pinch-to-zoom functionality here: https://unity3d.com/learn/tutorials/topics/mobile-touch/pinch-zoom?playlist=17138.