title: Unity3d Raycast on mesh position
body: <p>I want to hit a mesh with a raycast and get the mouse/screen coordinates of where the hit occurred.</p>
  
  <pre><code>public class GetCoordinates: MonoBehaviour {
  
      private GameObject _objectToHit;
  
      private RaycastHit hit;
      private Collider coll;
      private Ray ray;
      private float hitDistance = 200f;
  
      void Start()
      {
          coll = GetComponent&lt;Collider&gt;();
          _objectToHit = GameObject.Find("Street");
      }
  
      void Update()
      {
          ray = Camera.main.ScreenPointToRay(Input.mousePosition);
  
          if (coll.Raycast(ray, out hit, hitDistance))
          {
                Debug.Log(hit.point);
          }
      }
  }
  </code></pre>
  
  <p>Also I am not sure where to add the script, to the object being hit or to the camera?</p>