- Home /
Question by
The Roman One · Sep 11, 2012 at 09:43 PM ·
positionobjecttouchclickcoordinate
Click Position
Hey guys. Suppose there's an object, for example a wall ---> (0,0,0) (5,0,0) (0,5,0) (5,5,0).
and the player clicks that wall on a random (x,y,z) position. Is there any way to get the coordinates/position of the spot where the player hit the object?
if not, is there any logic alternative? I really need this for my game...
Thanks =]
Comment
i woul try putting the wall inside an empty gameObject and the set the wall inside the empty object to 000, then check for the local position when user hits the wall. just make sure the pivot point is in the middle
Answer by flaviusxvii · Sep 11, 2012 at 10:18 PM
http://answers.unity3d.com/questions/60194/get-position-of-mouse-aim-to-world.html
Recycling one of my answers..