Contents

hitTest(_:types:)

Searches for objects corresponding to a point in the view based on a set of result types.

Declaration

@MainActor @preconcurrency func hitTest(_ point: CGPoint, types: ARHitTestResult.ResultType) -> [ARHitTestResult]

Parameters

  • point:

    A point in the view’s coordinate system.

  • types:

    The hit test search type to look for.

Return Value

An array of hit results.

Discussion

The method ignores entities that lack a CollisionComponent.

See Also

Finding entities at a point in the view