Tag Info

New answers tagged


The problem is, OnMouseDown() is a mouse event which fires irrespective of where the mouse clicked. It just tells you that mouse was clicked, not where it was clicked. Now let's say you named your sprite as Meme.Use this: void Update () { if (Input.GetMouseButtonDown(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); ...

Top 50 recent answers are included