//------------------------ events ------------------------- void OnMouseDown() { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit)) { cam.AdjustPath(Quaternion.LookRotation(hit.point)); int[] selected_quad = TerrainHelper.TriangleIndices(hit.triangleIndex); string debug_text = hit.triangleIndex.ToString() + ": " + selected_quad[0].ToString() + ", " + selected_quad[1].ToString(); Debug.Log(debug_text); } }