Hello, mates!
Which would be the best way to implement a swipe gesture to change the position and gravity of a sprite?
I want to make it by tracking the speed of the gesture depending on the finger movement (fast/abrupt or slow/smooth). It would be like a drag and drop only the Y-axis, but making the swipe on any region of the screen.
Swipe up: Sprite above the rectangle.
Swipe down: Sprite below the rectangle.
And the idea is that the sprite would make a little jump on the start of the swipe and before it would go behind the rectangle (and the same but in reverse when swipping up).
This is a sketch to understand my question:
i.imgur.com/TAfyJXH.png
Thank you in advance!