API Docs for: 0.6.1
Show:

RaycastResult Class

Storage for Ray casting data.

Constructor

RaycastResult

()

Methods

abort

()

reset

()

Reset all result data.

set

(
  • rayFromWorld
  • rayToWorld
  • hitNormalWorld
  • hitPointWorld
  • shape
  • body
  • distance
)

Parameters:

Properties

_shouldStop

Boolean private

If the ray should stop traversing the bodies.

Default: false

body

Body

The hit body, or null.

distance

Number

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

Default: -1

hasHit

Boolean

hitFaceIndex

Number

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

Default: -1

hitNormalWorld

Vec3

hitPointWorld

Vec3

rayFromWorld

Vec3

rayToWorld

Vec3

shape

Shape

The hit shape, or null.