Line movement

I’m trying to make the move in the game “Dancing Ballz”. How would I make the character move along the path of the image and that when I reach the corners where the circles are, if I touch the screen it will move in the direction of the path.
Image> https://ibb.co/6strFts

I dont know the game you are talking about, but if those marker points are known, you can simply calculate the vector (let’s call it direction) from point A to B and then set player.forward = direction. Then after you reached point B, calculate the vector from B to C, set player.forward = direction and so on and so forth.
Then simply player / ball along its forward/backward axis.