На сколько я помню - пик это каст, так что вот пример:
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public float distanceToGround;
public Vector3 groundPoint;
void Update() {
RaycastHit hit;
// стрельба идет из позиции текущего объекта вниз
if (Physics.Raycast(transform.position, Vector3.down, out hit))
{
// попали
distanceToGround = hit.distance;
groundPoint = hit.point;
}
else
{
// не попали
}
}
}
подробнее тут:
http://docs.unity3d.com/Documentatio...s.Raycast.html