<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNHitTestOption/rootNode",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:@SCNHitTestRootNodeKey"
  },
  "title" : "rootNode"
}
-->

# rootNode

The root of the node hierarchy to be searched.

```
static let rootNode: SCNHitTestOption
```

## Discussion

The value for this key is an [`SCNNode`](/documentation/SceneKit/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`](/documentation/SceneKit/SCNSceneRenderer) object with the [`hitTest(_:options:)`](/documentation/SceneKit/SCNSceneRenderer/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:)`](/documentation/SceneKit/SCNNode/hitTestWithSegment(from:to:options:)), the default value is the node.

---

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)