Ray Class
A line in 3D space that intersects bodies and return points.
Methods
intersectBodies
(
Array
-
bodies
Parameters:
-
bodies
ArrayAn array of Body objects.
Returns:
Array:
See intersectBody
intersectBody
(
Array
-
body
Shoot a ray at a body, get back information about the hit.
Parameters:
-
body
Body
Returns:
Array:
An array of results. The result objects has properties: distance (float), point (Vec3) and body (Body).
intersectShape
(
Array
-
shape
-
quat
-
position
-
body
Parameters:
-
shape
Shape -
quat
Quaternion -
position
Vec3 -
body
Body
Returns:
Array:
See intersectBody()