Swipe gesture?

Hello. How can I detect the swipe gesture (I want to copy the system apple uses for deleting messages, songs, etc.)?

You can detect a swipe by recording the position of a touch from frame to frame using Update.

Using the touch position on the current frame and the touch position on the previous frame, you should be able to calculate a touch “velocity”. You can then determine what velocity is going to be sufficient to call it a swipe. You can then determine different direction swipes depending on the x/y values of the position change.

In fact, a Touch has properties called deltaPosition and deltaTime that could be used to calculate this easily. touchVelocity = deltaPosition / deltaTime!