hi all, i would like someone to help me or point me in the right direction for making a script which will control a game object, like if i click on it , it follows my mouse until i click.
my current code is here…
var speed;
function OnMouseDown(){
transform.position = Vector3.MoveTowards(transform.position, MouseCursor.transform.position, .03);
}