Contents

ARRaycastQuery

A mathematical ray you use to find 3D positions on real-world surfaces.

Declaration

class ARRaycastQuery

Overview

You create a raycast query by providing a 3D vector and starting place.

To create a raycast query using a 2D screen location and default vector that casts outward in the z-direction from the user, use the convenience functions, makeRaycastQuery(from:allowing:alignment:) on ARView, or raycastQuery(from:allowing:alignment:) on ARSCNView.

Raycasts can intersect with planes (flat surfaces) or meshes (uneven surfaces). To intersect with planes, see ARRaycastQuery.Target. To intersect with meshes, see ARRaycastQuery.Target.estimatedPlane.

Topics

Creating a Raycast Query

Specifying the Target

Interpreting the Ray

Initializers

See Also

Raycasting