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:
or
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]