Instance Method


Searches for real-world objects or AR anchors in the captured camera image.


- (NSArray<ARHitTestResult *> *)hitTest:(CGPoint)point types:(ARHitTestResultType)types;



A point in normalized image coordinate space. (The point (0,0) represents the top left corner of the image, and the point (1,1) represents the bottom right corner.)


The types of hit-test result to search for.

Return Value

A list of results, sorted from nearest to farthest (in distance from the camera).


Hit testing searches for real-world objects or surfaces detected through the AR session's processing of the camera image. A 2D point in the image coordinates can refer to any point along a 3D line that starts at the device camera and extends in a direction determined by the device orientation and camera projection. This method searches along that line, returning all objects that intersect it in order of distance from the camera.

See Also

Tracking and Finding Objects


The list of anchors representing positions tracked or objects detected in the scene.