274 {
276 return null;
277
279
282 g_Game.GetObjectsAtPosition3D(spawnPosWorld, 1.5, objects, proxyCargos);
283
284 float bestDist = 999999;
286
287 foreach (
Object obj : objects)
288 {
290 {
291 float dist =
vector.
Distance(spawnPosWorld, obj.GetWorldPosition());
292 if (dist < bestDist)
293 {
294 bestDist = dist;
296 }
297 }
298 }
299
300 return bestBox;
301 }
const string CRATE_SPAWN_POSITION_MEM_NAME
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.