System GetEntitiesInSphere

From CryWiki

Jump to: navigation, search

System.GetEntitiesInSphere(vec3, number)

Description

Gets all entities in a sphere

Arguments

  1. Position of the sphere (center)
  2. Radius of the sphere

Returns

Table with entities inside the sphere

Example

Lua (example)
local ents=System.GetEntitiesInSphere(g_localActor:GetPos(), 50);
Log("There are "..table.getn(ents).." in a sphere around me");


Notes

To filter by class, use GetEntitiesInSphereByClass.

Personal tools