---
title: "hitTest(_:options:)"
framework: scenekit
role: symbol
role_heading: Instance Method
path: "scenekit/scnscenerenderer/hittest(_:options:)"
---

# hitTest(_:options:)

Searches the renderer’s scene for objects corresponding to a point in the rendered image.

## Declaration

```swift
func hitTest(_ point: CGPoint, options: [SCNHitTestOption : Any]? = nil) -> [SCNHitTestResult]
```

## Parameters

- `point`: A point in the screen-space (view, layer, or GPU viewport) coordinate system of the scene renderer.
- `options`: A dictionary of options affecting the search. See Hit Testing Options Keys for acceptable values.

## Return Value

Return Value An array of SCNHitTestResult objects representing search results.

## Discussion

Discussion A 2D point in the rendered screen coordinate space can refer to any point along a line segment in the 3D scene coordinate space. Hit-testing is the process of finding elements of a scene located along this line segment. For example, you can use this method to find the geometry corresponding to a click event in a SceneKit view.

## See Also

### Working With Projected Scene Contents

- [SCNHitTestOption](scenekit/scnhittestoption.md)
- [isNode(_:insideFrustumOf:)](scenekit/scnscenerenderer/isnode(_:insidefrustumof:).md)
- [nodesInsideFrustum(of:)](scenekit/scnscenerenderer/nodesinsidefrustum(of:).md)
- [projectPoint(_:)](scenekit/scnscenerenderer/projectpoint(_:).md)
- [unprojectPoint(_:)](scenekit/scnscenerenderer/unprojectpoint(_:).md)
