- Home /
Get position of mouse aim to world?
How would I go about getting what position my mouse is pointing in a game environment? For example, if I'm pointing at the foot of a tree at position (100,50,0), how would I make it get the position of (100,50,0) or where the mousever the mouse would hit?
Answer by flaviusxvii · Apr 23, 2011 at 07:18 PM
Search first. Ask if you get stumped.
Exactly. This is one of the most answered questions out there.
I'm aware of Input.mousePosition. What I'm trying to do at the moment is get the position the cursor is ai$$anonymous$$g at. And I've been searching for an answer for about an hour. $$anonymous$$ind cluing me in?
I've tried to $$anonymous$$ch you to fish (google search).. but this time i'll just throw the fish at ya. http://unity3d.com/support/documentation/ScriptReference/Camera.ScreenToWorldPoint.html
Learn to search though!