how to get the coordinates of a gameobject or location using mouse click…?
if I click an gameobject i want to know what’s the coordinates same as if I’d click a location…
help please
how to get the coordinates of a gameobject or location using mouse click…?
if I click an gameobject i want to know what’s the coordinates same as if I’d click a location…
help please
You are looking for Input and ScreenToWorldPoint. Documentation has enough examples…
Vector3 worldPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition);