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

pickEntity

pickEntity(world, raycaster): Entity | null

The entity under raycaster, or null where it meets none: the nearest hit among every entity’s object and the ground’s scatter, walked up to the entity that owns it, passing through an entity the devtools hid. The devtools set the raycaster from the canvas’s pointer and the mounted camera. On a pointer event, not a step, so the arrays here are fine.

Parameter Type
world World
raycaster Raycaster

Entity | null