Rotating, moving and keep on going with constant velocity in direction of click

Hi, I am trying to create a 2D object which rotates and move in the direction of mouse click/touch. Also, I want this object to keep on going with constant speed in same direction even if it reaches the click/touch position. It should only change direction when user again clicks/touches the screen. I really appreciate all the help, thank you.

Hey, so first of all you have to create ‘LookAtCursor’ method… Check this out:


This can be implemented on any object that will follow the cursor.
And at last, add transform.position+=transform.forward; to start moving forward [following cursor]