Contents

raycastQuery(from:allowing:alignment:)

Get a ray-cast query for a screen point.

Declaration

func raycastQuery(from point: CGPoint, allowing target: ARRaycastQuery.Target, alignment: ARRaycastQuery.TargetAlignment) -> ARRaycastQuery

Parameters

  • point:

    A normalized coordinate in the UI system, where 0 is top-left, and 1 is bottom-right.

  • target:

    The types of plane you allow this ray cast to intersect with.

  • alignment:

    An alignment with respect to gravity a plane must have to interset this ray.

Discussion

To cast the ray, you pass the resulting query to your current session via raycast(_:) or trackedRaycast(_:updateHandler:).

See Also

Tracking and interacting with the real world