castRayFirst

open fun castRayFirst(ray: DRay3, maxDistance: Double, settings: PhysicsQuery.RayCastSettings, filter: PhysicsQuery.Filter): PhysicsQuery.RayCast?

Gets every collider whose shape intersects ray, up to a maximum distance of maxDistance away from DRay3.origin.

Return

The first result found, stopping the query after this result.

Parameters

ray

The ray to test against.

maxDistance

The maximum distance the ray will hit colliders.

settings

Settings on how the raycast will behave.

filter

The filter for determining which colliders are tested against.