Hi. I am trying to detect when the user does a swipe gesture and in what direction. I have been told that this can be done by finding
the “velocity” of a touch and then measuring either the x or y components of the Vector2 deltaPosition gives. I tried to set up a basic test to see if I can detect a horizontal swipe but I am getting errors saying: An instance of type ‘UnityEngine.Touch’ is required to access non static member 'deltaPosition(or deltaTime). What is wrong? Thanks
var Velocity_X = 0;
function Update(){
Velocity_X = Touch.deltaPosition.x / Touch.deltaTime;
}