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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
raycaster |
Raycaster |
Returns
Section titled “Returns”Entity | null