1718 {
1719 vector closest_pos = to_pos;
1720 float smallest_dist = float.MAX;
1722 {
1724 vpos[0] = pos[0];
1725 vpos[2] = pos[1];
1726
1727 to_pos[1] = 0;
1729 if ( dist < smallest_dist)
1730 {
1731 smallest_dist = dist;
1732 closest_pos = vpos;
1733 }
1734 }
1735 return closest_pos;
1736 }
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.