Using the overhead view how can I move the mouse cursor around the screen while having the object rotate around the z-axis so the object faces the mouse cursor.
I thought something like the code below would work but apparently not.
transform.LookAt (new Vector3 (Input.mousePosition.x, Input.mousePosition.y, 0));
I know very little so if you could explain your code that would be very helpful. Thanks!
↧