readTriggerOccupants
readTriggerOccupants(
world,trigger): readonlyEntity[]
Each entity inside trigger now, by any of its colliders, or, for a
<Trigger>, each of its targets inside its sphere: the state its entry
and exit events report. A reader that missed an event, past the event
log’s bound or added after the entry, finds who is inside. Answered
where the trigger is simulated: on a page, a trigger the room streams
throws in development, pointing to isTouching for the player’s own
character, and reads empty deployed. The list is refilled by the next
call: copy it to keep it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
trigger |
Entity |
Returns
Section titled “Returns”readonly Entity[]
Example
Section titled “Example”for (const inside of readTriggerOccupants(world, goal)) score(inside);