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:

  • rayFromWorld Array
  • rayToWorld Array
  • hitNormalWorld Array
  • hitPointWorld Array
  • shape Shape
  • body Body
  • distance Number

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

Array

hitPointWorld

Array

rayFromWorld

Array

rayToWorld

Array

shape

Shape

The hit shape, or null.