---
title: rootNode
framework: scenekit
role: symbol
role_heading: Type Property
path: scenekit/scnhittestoption/rootnode
---

# rootNode

The root of the node hierarchy to be searched.

## Declaration

```swift
static let rootNode: SCNHitTestOption
```

## Discussion

Discussion The value for this key is an SCNNode object. Hit-testing searches only the child node hierarchy under this node. When hit-testing takes place in the screen space of an SCNSceneRenderer object with the hitTest(_:options:) method, the default value is the presented scene’s root node. When hit-testing is in a node using its hitTestWithSegment(from:to:options:), the default value is the node.

## See Also

### Options

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