Class

ARRaycastResult

Information about a real-world surface found by examining a point on the screen.

Declaration

@interface ARRaycastResult : NSObject

Overview

If you use RealityKit or SceneKit as your renderer, you can search for real-world surfaces at a screen point using the raycastQueryFromPoint:allowingTarget:alignment: function of ARSCNView.

If you use a custom renderer, you can find real-world positions using screen points with:

For tracked ray-casting, you call trackedRaycast:updateHandler: on your app's current ARSession.

Topics

Identifying Results

worldTransform

The position, rotation, and scale, of the ray's intersection with the target.

anchor

The anchor for the plane that the ray intersected.

target

The type of plane that the ray intersected.

ARRaycastTarget

The types of plane you allow a raycast to intersect with.

targetAlignment

The alignment of the plane that the ray intersected.

ARRaycastTargetAlignment

A specification that indicates a target's alignment with respect to gravity.

Relationships

Inherits From

See Also

Ray-Casting

ARRaycastQuery

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

ARTrackedRaycast

A ray-cast query that ARKit repeats in succession to give you refined results over time.