Enumeration Case

ARHitTestResultTypeEstimatedHorizontalPlane

A point on a real-world planar surface detected during the search, whose orientation is perpendicular to gravity.

Declaration

ARHitTestResultTypeEstimatedHorizontalPlane = (1 << 1)

Discussion

ARKit provides two ways to locate real-world flat surfaces in a scene. Plane detection (enabled with planeDetection on your session configuration) is an ongoing process, continuously analyzing the scene to accurately map the position and extent of any planes in view. Because plane detection takes time, you can fall back to plane estimation to get an instant, but less accurate, indication of whether a 2D point in the camera image corresponds to a real-world flat surface.

Because plane detection results are more accurate than plane estimation results, ARKit prefers the former when searching for both. If your hit-test search includes both ARHitTestResultTypeEstimatedHorizontalPlane and one or more ARHitTestResultTypeExistingPlane types, and the search finds any already detected plane anchors, the search returns only the existing plane(s) and no estimated plane.

An estimated plane search returns at most one result—the best estimate for a horizontal plane intersecting the hit-test ray.

See Also

Result Types

ARHitTestResultTypeFeaturePoint

A point on a surface detected by ARKit, but not part of any detected planes.

ARHitTestResultTypeEstimatedVerticalPlane

A point on a real-world planar surface detected during the search, whose orientation is parallel to gravity.

ARHitTestResultTypeExistingPlane

A point on a real-world plane (already detected with the planeDetection option), without considering the plane's size.

ARHitTestResultTypeExistingPlaneUsingExtent

A point on a real-world plane (already detected with the planeDetection option), respecting the plane's estimated size.

ARHitTestResultTypeExistingPlaneUsingGeometry

A point on a real-world plane (already detected with the planeDetection option), respecting the plane's estimated size and shape.