---
title: CollisionCastHit
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/collisioncasthit
---

# CollisionCastHit

A hit result of a collision cast.

## Declaration

```swift
struct CollisionCastHit
```

## Overview

Overview You get a collection of collision cast hits from either the raycast(origin:direction:length:query:mask:relativeTo:) method, or the 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](realitykit/collisioncasthit/entity.md)

### Characterizing the collision cast hit

- [position](realitykit/collisioncasthit/position.md)
- [normal](realitykit/collisioncasthit/normal.md)
- [distance](realitykit/collisioncasthit/distance.md)

### Structures

- [CollisionCastHit.TriangleHit](realitykit/collisioncasthit/trianglehit-swift.struct.md)

### Instance Properties

- [shapeIndex](realitykit/collisioncasthit/shapeindex.md)
- [triangleHit](realitykit/collisioncasthit/trianglehit-swift.property.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)

## See Also

### Ray casting

- [CollisionCastHit.TriangleHit](realitykit/collisioncasthit/trianglehit-swift.struct.md)
- [CollisionCastQueryType](realitykit/collisioncastquerytype.md)
- [PixelCastHit](realitykit/pixelcasthit.md)
