hitTest

fun Frame.hitTest(ray: Ray): List<HitResult>

Similar to Frame.hitTest, but takes an arbitrary ray in world space coordinates instead of a screen-space point.

Note: When using Session.Feature.FRONT_CAMERA, the returned hit result list will always be empty, as the camera is not TrackingState.TRACKING. Hit testing against tracked faces is not currently supported.

Return

an ordered list of intersections with scene geometry, nearest hit first

Parameters

ray

a ray containing an origin and direction in world space coordinates. Does not have to be normalized.