Class RaycastResult

Storage for Ray casting data

Constructors

Properties

body: Body

body

distance: number

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

hasHit: boolean

hasHit

hitFaceIndex: number

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

hitNormalWorld: Vec3

hitNormalWorld

hitPointWorld: Vec3

hitPointWorld

rayFromWorld: Vec3

rayFromWorld

rayToWorld: Vec3

rayToWorld

shape: Shape

shape

shouldStop: boolean

If the ray should stop traversing the bodies

Methods

  • abort

    Returns void

  • Reset all result data.

    Returns void

  • Set result data.

    Parameters

    Returns void