hi there, so iam working on a game where player moves character with his finger. there are only 4 ways of movement. up, down, left , right. this image explains how the ball is moved right or left ( goo.gl/yxewTK ).
Note : the ball must stay in the black line even if the swipe made by player is a little curved one, the ball moves only right and left not curved movement.
same thing about moving up or down ( goo.gl/QcUClj ). one last thing, about movement speed. the ball speed depends on the speed the player swipes the screen. if player swipes right 2 cm. the ball also moves right the same distance the player made with finger so in this case is 2 cm. when player removes his finger the ball stops.
thank you very much.