Class that represents the result of a raycast.

### Hierarchy

- RaycastResult

## Index

### Constructors

- constructor

### Properties

- entityHandleArg
- handle
- hitPositionArg
- hitSomethingArg
- materialArg
- result
- surfaceNormalArg

### Accessors

- DidHit
- DidHitEntity
- HitEntity
- HitPosition
- Material
- Result
- SurfaceNormal

## Constructors

### constructor

- new RaycastResult(handle: number): RaycastResult

- - Defined in Raycast.ts:72

  Create a RaycastResult object that gets the results from a StartShapeTestRay()

  #### Parameters

  - ##### handle: number

    The handle returned from StartShapeTestRay()

  #### Returns RaycastResult

## Properties

### Private entityHandleArg

entityHandleArg: null | Ped | Vehicle | Prop

- Defined in Raycast.ts:62

### Private handle

handle: number

- Defined in Raycast.ts:59

### Private hitPositionArg

hitPositionArg: Vector3

- Defined in Raycast.ts:60

### Private hitSomethingArg

hitSomethingArg: boolean

- Defined in Raycast.ts:61

### Private materialArg

materialArg: MaterialHash

- Defined in Raycast.ts:64

### Private result

result: number

- Defined in Raycast.ts:65

### Private surfaceNormalArg

surfaceNormalArg: Vector3

- Defined in Raycast.ts:63

## Accessors

### DidHit

- get DidHit(): boolean

- - Defined in Raycast.ts:34

  Whether we hit anything.

  #### Returns boolean

### DidHitEntity

- get DidHitEntity(): boolean

- - Defined in Raycast.ts:41

  Whether the entity hit exists.

  #### Returns boolean

### HitEntity

- get HitEntity(): null | Ped | Vehicle | Prop

- - Defined in Raycast.ts:13

  Return the entity that was hit.

  #### Returns null | Ped | Vehicle | Prop

### HitPosition

- get HitPosition(): Vector3

- - Defined in Raycast.ts:20

  Get the position of the entity that was hit.

  #### Returns Vector3

### Material

- get Material(): MaterialHash

- - Defined in Raycast.ts:48

  Material type that was hit.

  #### Returns MaterialHash

### Result

- get Result(): number

- - Defined in Raycast.ts:55

  Raycast result's handle.

  #### Returns number

### SurfaceNormal

- get SurfaceNormal(): Vector3

- - Defined in Raycast.ts:27

  Return the vector perpendicular to the tangent plane.

  #### Returns Vector3

Generated using TypeDoc