input touch

Hello, I could not find a content so that the character can go the desired direction with the android touch button. Can anyone help me with this? I want the character to go to the location he wants, if he is doing forward, if he is doing forward right, I want him to stop at the location he is in when he pulls the screen to the right.