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

findEntityUnderRay

findEntityUnderRay(world, ray, entityUnderRayOptions): Entity | undefined

The entity of query that ray crosses first, by its drawn bounds, nearer than within metres, of those accepts takes: what a click, a tap or a crosshair picks. Undefined where it crosses none. ponytail: the bounds box, not the mesh, so a click between the character’s legs or on its hair’s edge still lands; a capsule hit test if the box proves too generous in a crowd.

Parameter Type
world World
ray Ray
entityUnderRayOptions EntityUnderRayOptions

Entity | undefined