Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

findNearestControlled

findNearestControlled(world, position, search?): NearestControlled | null

The controlled entity closest to position that search counts, as { entity, distance }, with distance in metres from position to the entity’s feet; null where no controlled entity counts. With no search, every controlled entity counts, measured in 3D.

Parameter Type
world World
position Vector3
search? NearestControlledSearch

NearestControlled | null