Skip to content

getFirstHitDistance

getFirstHitDistance(bvh, __namedParameters): number | null

Defined in: packages/engine/src/maths/solids.ts:45

Metres along the ray to the first face it meets, or null where it meets none within far. Double sided, because a ray that starts inside a trunk should still report the wall it leaves through rather than nothing at all.

Parameter Type
bvh MeshBVH
__namedParameters RayQuery

number | null