move character towards the mouse on click

hello. i’ve read every topic about my task i could found, but still didn’t got it working. i have an animated characted and need to make it moving towards the cursor on click. could someone give me detailed instructions how to do it?


  • Get the position of click.
  • Convert that position to world coordinates using Camera.ScreenToWorldPoint.
  • Then move your character towards the target position using either Vector3.Lerp or MoveTowards or Translate or …
  • While moving play the animation of character walking or running or whatever it is.
  • Viola! You are done.