how to move the object as per swipe direction on unity3d

I need to create a script to move the object as per swipe direction on unity3d for mobile game. as per image bellow.

Check die Finger position while touch is pressed and generate a curve, or if simple just start and end point than you have the direction. and the time it took you can take as a multiplicator for the speed of the ball