<!--
{
  "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/SCNHitTestResult",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNHitTestResult"
  },
  "title" : "SCNHitTestResult"
}
-->

# SCNHitTestResult

Information about the result of a scene-space or view-space search for scene elements.

```
class SCNHitTestResult
```

## Overview

Hit-testing is the process of finding elements of a scene located at a specified point, or along a specified line segment (or *ray*). An [`SCNHitTestResult`](/documentation/SceneKit/SCNHitTestResult) object provides details about one result from a hit-test search. There are three ways to perform a hit-test search. Use the [`hitTest(_:options:)`](/documentation/SceneKit/SCNSceneRenderer/hitTest(_:options:)) method of an [`SCNView`](/documentation/SceneKit/SCNView) object (or other scene renderer), the [`hitTestWithSegment(from:to:options:)`](/documentation/SceneKit/SCNNode/hitTestWithSegment(from:to:options:)) method of a node, or the [`rayTestWithSegment(from:to:options:)`](/documentation/SceneKit/SCNPhysicsWorld/rayTestWithSegment(from:to:options:)) method of your scene’s physics world.

When you perform a hit-test search, SceneKit looks for [`SCNGeometry`](/documentation/SceneKit/SCNGeometry) objects along the ray you specify. For each intersection between the ray and and a geometry, SceneKit creates a hit-test result to provide information about both the [`SCNNode`](/documentation/SceneKit/SCNNode) object containing the geometry and the location of the intersection on the geometry’s surface.

## Topics

### Retrieving Information About a Hit-Test Result

[`node`](/documentation/SceneKit/SCNHitTestResult/node)

The node whose geometry intersects the search ray.

[`geometryIndex`](/documentation/SceneKit/SCNHitTestResult/geometryIndex)

The index of the geometry element whose surface the search ray intersects.

[`faceIndex`](/documentation/SceneKit/SCNHitTestResult/faceIndex)

The index of the primitive in the geometry element intersected by the search ray.

[`localCoordinates`](/documentation/SceneKit/SCNHitTestResult/localCoordinates)

The point of intersection between the geometry and the search ray, in the local coordinate system of the node containing the geometry.

[`worldCoordinates`](/documentation/SceneKit/SCNHitTestResult/worldCoordinates)

The point of intersection between the geometry and the search ray, in the scene’s world coordinate system.

[`localNormal`](/documentation/SceneKit/SCNHitTestResult/localNormal)

The surface normal vector at the point of intersection, in the local coordinate system of the node containing the geometry intersected by the search ray.

[`worldNormal`](/documentation/SceneKit/SCNHitTestResult/worldNormal)

The surface normal vector at the point of intersection, in the scene’s world coordinate system.

[`modelTransform`](/documentation/SceneKit/SCNHitTestResult/modelTransform)

The world transform matrix of the node containing the intersection.

[`-  textureCoordinatesWithMappingChannel:`](/documentation/SceneKit/SCNHitTestResult/textureCoordinates(withMappingChannel:))

Returns the texture coordinates at the point of intersection for the specified texture mapping channel.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

---

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)