How to get touch movements?

What code would I use to get a swipe gesture from a iOS/Android device so when I swipe up, my player will go up? I know I have to use input.touches or something like that, anyone have any help?

look at the delta touch position and how much it changes over an update frame. Also theres a few plugins for this as well.

Check out the touch script asset on the asset store. It’s free :smile:

https://www.assetstore.unity3d.com/#/content/7394