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

# hitTest(_:options:)

Searches the Scene Kit scene for objects corresponding to a point in the rendered image.

## Declaration

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

## Parameters

- `point`: A point in the viewport coordinate system of the SpriteKit node.
- `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 point in the SpriteKit node’s 2D viewport coordinate space can refer to any point along a line segment in the 3D SceneKit 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 touch event.

## See Also

### Projecting Points and Performing Hit-Testing

- [projectPoint(_:)](spritekit/sk3dnode/projectpoint(_:).md)
- [unprojectPoint(_:)](spritekit/sk3dnode/unprojectpoint(_:).md)
