How do I set mouse position or touch position moving object only left and right ? I need make pong game,but I need to move object only at position left and right.
Develop games in your browser. Powerful, performant & highly capable.
Every tick : set Paddle position to Touch.X and Paddle.Y
or
every tick : paddle - set X to touch.x
( no need to set y each time)