Differentiating between a tap from a swipe on Android

I’m trying to differentiate a tap from a swipe. I have it in my game so if you tap the screen, the character on the screen jumps, and if you swipe down, he slides/ducks. The problem is, I can’t seem to figure out how to differentiate a tap from a swipe. The character will always jump, because the jump code is simply:

if (Input.touchCount > 0) { Jump(); }

I’ve seen some people ask the same question, and some people answer “check time.deltaTime and see if it has moved or stayed still”, this seems like a good way to do it, but I’m not sure how to do it.

I think all you need is to become familiar with the Touch class, and Input.Touches

The TouchPhase and deltaPosition should be all you need, but the class has more data you may be able to utilize as well.