API Docs for: 0.6.1
Show:

Ray Class

A line in 3D space that intersects bodies and return points.

Constructor

Ray

(
  • from
  • to
)

Parameters:

Methods

getAABB

(
  • aabb
)

Get the AABB of the ray.

Parameters:

intersectBodies

(
  • bodies
  • result
)

Parameters:

intersectBody

(
  • body
  • result
  • [direction]
)
private

Shoot a ray at a body, get back information about the hit.

Parameters:

intersectBox

(
  • shape
  • quat
  • position
  • body
  • direction
  • result
)
private

Parameters:

intersectConvex

(
  • shape
  • quat
  • position
  • body
  • direction
  • result
  • [options]
)
private

Parameters:

intersectHeightfield

(
  • shape
  • quat
  • position
  • body
  • direction
  • result
)
private

Parameters:

intersectPlane

(
  • shape
  • quat
  • position
  • body
  • direction
  • result
)
private

Parameters:

intersectShape

(
  • shape
  • quat
  • position
  • body
  • direction
  • result
)
private

Parameters:

intersectSphere

(
  • shape
  • quat
  • position
  • body
  • direction
  • result
)
private

Parameters:

reportIntersection

(
  • normal
  • hitPointWorld
  • shape
  • body
  • result
)
Boolean private

Parameters:

Returns:

Boolean:

True if the intersections should continue

Properties

checkCollisionResponse

Boolean

Set to true if you want the Ray to take .collisionResponse flags into account on bodies and shapes.

from

Vec3

precision

Number

The precision of the ray. Used when checking parallelity etc.