castRay

abstract fun castRay(ray: DRay3, maxDistance: Double, settings: PhysicsQuery.RayCastSettings, filter: PhysicsQuery.Filter, fn: (PhysicsQuery.RayCast) -> PhysicsQuery.Result)

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

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.

fn

The callback to run for each result, allowing you to continue or stop the query.