# Class ShapeCastHit

The intersection between a ray and a collider.

#### Hierarchy (view full)

- ShapeCastHit
  - ColliderShapeCastHit

- Defined in geometry/toi.d.ts:8

#####
Index

### Constructors

constructor

### Properties

normal1
normal2
time_of_impact
witness1
witness2

### Methods

fromRaw

## Constructors

### constructor

- new ShapeCastHit(time_of_impact, witness1, witness2, normal1, normal2): ShapeCastHit

- #### Parameters

  - time_of_impact: number
  - witness1: Vector
  - witness2: Vector
  - normal1: Vector
  - normal2: Vector

  #### Returns ShapeCastHit

  - Defined in geometry/toi.d.ts:33

## Properties

### normal1

normal1: Vector

The local-space normal on the first shape, at the time of impact.

- Defined in geometry/toi.d.ts:27

### normal2

normal2: Vector

The local-space normal on the second shape, at the time of impact.

- Defined in geometry/toi.d.ts:32

### time_of_impact

time_of_impact: number

The time of impact of the two shapes.

- Defined in geometry/toi.d.ts:12

### witness1

witness1: Vector

The local-space contact point on the first shape, at the time of impact.

- Defined in geometry/toi.d.ts:17

### witness2

witness2: Vector

The local-space contact point on the second shape, at the time of impact.

- Defined in geometry/toi.d.ts:22

## Methods

### `Static` fromRaw

- fromRaw(colliderSet, raw): ShapeCastHit

- #### Parameters

  - colliderSet: ColliderSet
  - raw: RawShapeCastHit

  #### Returns ShapeCastHit

  - Defined in geometry/toi.d.ts:34