Click on the
Input.mousePosition entry and check out the resulting page. The Language Reference tells us that we have a new origin to deal with. Unity treats our screen like a flat, 2D plane, with (0, 0) the origin in the bottom-left corner of the screen like a bar graph from 4th grade.
We have a code example here, but it looks a little hairy. What's a
Physics.Raycast? I have no idea. And how do we get the x, y, and z values for
The answer is a tiny bit sneaky. Look at the top of the screen where it tells us that
Input.mousePosition is a
Vector3. What's a
Vector3? I dunno. Click on ...