1705 {
1706 vector closest_pos = to_pos;
1707 float smallest_dist = float.MAX;
1709 {
1711 vpos[0] = pos[0];
1712 vpos[2] = pos[1];
1713
1714 to_pos[1] = 0;
1716 if ( dist < smallest_dist)
1717 {
1718 smallest_dist = dist;
1719 closest_pos = vpos;
1720 }
1721 }
1722 return closest_pos;
1723 }
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.