TMeshAABBTree3::FindNearestTriangle

Find the triangle closest to P, and distance to it, within distance MaxDist, or return InvalidID Use MeshQueries.TriangleDistance() to get more information