API Docs for: 0.6.1
Show:

RaycastResult Class

Storage for Ray casting data.

Constructor

RaycastResult

()

Methods

reset

()

Reset all result data.

set

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

Parameters:

Properties

body

Body

The hit body, or null.

distance

Number

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

hasHit

Boolean

hitNormalWorld

Vec3

hitPointWorld

Vec3

rayFromWorld

Vec3

rayToWorld

Vec3

shape

Shape

The hit shape, or null.