Garry's Mod Wiki

ents.FindInSphere

  table ents.FindInSphere( Vector origin, number radius )

Description

Gets all entities within the specified sphere.

This internally uses a Spatial Partition to avoid looping through all entities.
Clientside entities will not be returned by this function.
This function internally calls ents.FindInBox with some radius checks.

Arguments

1 Vector origin
Center of the sphere.
2 number radius
Radius of the sphere.

Returns

1 table
A table of all found Entitys. Has a limit of 1024 entities.