Click To Move

Author: Sakar

Description
This script will move an object towards the mouse position when the left mouse button is clicked.

Usage
Simply attach the script towards the object you wish to have move towards the mouse. Change the smooth value to alter the speed at which the object moves.

Behavior
If you want the player to move and correct it's path while holding the mouse button, rather than only doing it when clicking, change "GetKeyDown" to "GetKey" on line 10.