How move actor in a direction using touch

Hi guys.

I like touch on screen of my cellphone and a character walk to there. But this character is not a player because i try do this using augmented reality project. So my camera is the player 0 and i have a character and i like to touch on screen and than this other actor walk to there. Its possible?

Thanks.

Hey!

Yes, it is possible. On event touch, you get the position and convert it to world space using ConvertScreenPositionToWorldPosition or something like that. There is your target location. Then just tell the character AI to walk there.

Hope this helped, cheers!

You can also use line trace. On touch a line trace starts and when it hits, calculate the location and move towards there.