1712 {
1713 vector closest_pos = to_pos;
1714 float smallest_dist = float.MAX;
1716 {
1718 vpos[0] = pos[0];
1719 vpos[2] = pos[1];
1720
1721 to_pos[1] = 0;
1723 if ( dist < smallest_dist)
1724 {
1725 smallest_dist = dist;
1726 closest_pos = vpos;
1727 }
1728 }
1729 return closest_pos;
1730 }
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.