<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/CollisionCastHit",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation16CollisionCastHitV"
  },
  "title" : "CollisionCastHit"
}
-->

# CollisionCastHit

A hit result of a collision cast.

```
struct CollisionCastHit
```

## Overview

You get a collection of collision cast hits from either the
[`raycast(origin:direction:length:query:mask:relativeTo:)`](/documentation/RealityKit/Scene/raycast(origin:direction:length:query:mask:relativeTo:)) method, or
the
[`convexCast(convexShape:fromPosition:fromOrientation:toPosition:toOrientation:query:mask:relativeTo:)`](/documentation/RealityKit/Scene/convexCast(convexShape:fromPosition:fromOrientation:toPosition:toOrientation:query:mask:relativeTo:))
method. Each hit indicates where the ray or the convex shape, starting at a
given point and traveling in a given direction, hit a particular entity in
the scene.

The frame of reference for the position and normal of the hit depends on the
reference entity parameter passed to the method that generated the hit. Pass
`nil` as the reference to use world space.

## Topics

### Getting the entity

[`entity`](/documentation/RealityKit/CollisionCastHit/entity)

The entity that was hit.

### Characterizing the collision cast hit

[`position`](/documentation/RealityKit/CollisionCastHit/position)

The position of the hit.

[`normal`](/documentation/RealityKit/CollisionCastHit/normal)

The normal of the hit.

[`distance`](/documentation/RealityKit/CollisionCastHit/distance)

The distance from the ray origin to the hit, or the convex shape travel
distance.

### Comparing collision cast hits

---

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)