---
title: clipToZRange
framework: scenekit
role: symbol
role_heading: Type Property
path: scenekit/scnhittestoption/cliptozrange
---

# clipToZRange

An option to search for objects only within the depth range of the current point of view.

## Declaration

```swift
static let clipToZRange: SCNHitTestOption
```

## Discussion

Discussion The value for this key is an NSNumber object containing a Boolean value. The default value is true, specifying that hit-testing searches only objects between the zNear and zFar distances of the pointOfView camera. Specify false to include objects outside this depth range in the search. This option is valid only when hit-testing in the screen space of an SCNSceneRenderer object with the hitTest(_:options:) method.

## See Also

### Options

- [backFaceCulling](scenekit/scnhittestoption/backfaceculling.md)
- [boundingBoxOnly](scenekit/scnhittestoption/boundingboxonly.md)
- [categoryBitMask](scenekit/scnhittestoption/categorybitmask.md)
- [ignoreChildNodes](scenekit/scnhittestoption/ignorechildnodes.md)
- [ignoreHiddenNodes](scenekit/scnhittestoption/ignorehiddennodes.md)
- [rootNode](scenekit/scnhittestoption/rootnode.md)
- [searchMode](scenekit/scnhittestoption/searchmode.md)
- [SCNHitTestSearchMode](scenekit/scnhittestsearchmode.md)
