<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ARView/hitTest(_:types:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:10RealityKit6ARViewC7hitTest_5typesSaySo05ARHitE6ResultCGSo7CGPointV_So0geH4TypeVtF"
  },
  "title" : "hitTest(_:types:)"
}
-->

# hitTest(_:types:)

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

```
@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`](/documentation/RealityKit/CollisionComponent).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)