castRayAll
castRayAll(
source,options): readonlyRayHitResult[]
Every collider a ray meets within maxDistance, nearest first, and two
as near by the lower entity id; one hit per collider, so an entity of
two colliders the ray passes through is listed twice. An empty list
where it meets none. Pooled, as castRay’s result is.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
source |
QuerySource |
options |
CastRayOptions |
Returns
Section titled “Returns”readonly RayHitResult[]
Example
Section titled “Example”for (const hit of castRayAll(step, { from, direction, maxDistance: 50 })) pierce(hit.entity);