Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RaycastResult

Storage for Ray casting data

Hierarchy

  • RaycastResult

Index

Constructors

constructor

Properties

body

body: null | Body

body

distance

distance: number

Distance to the hit. Will be set to -1 if there was no hit

hasHit

hasHit: boolean

hasHit

hitFaceIndex

hitFaceIndex: number

The index of the hit triangle, if the hit shape was a trimesh

hitNormalWorld

hitNormalWorld: Vec3

hitNormalWorld

hitPointWorld

hitPointWorld: Vec3

hitPointWorld

rayFromWorld

rayFromWorld: Vec3

rayFromWorld

rayToWorld

rayToWorld: Vec3

rayToWorld

shape

shape: null | Shape

shape

shouldStop

shouldStop: boolean

If the ray should stop traversing the bodies

Methods

abort

  • abort(): void

reset

  • reset(): void

set

  • set(rayFromWorld: Vec3, rayToWorld: Vec3, hitNormalWorld: Vec3, hitPointWorld: Vec3, shape: Shape, body: Body, distance: number): void