Ray Class
A line in 3D space that intersects bodies and return points.
Item Index
Methods
Properties
Methods
intersectBodies
(
-
bodies -
result
Parameters:
-
bodiesArrayAn array of Body objects.
-
resultRaycastResult
intersectBody
(
private
-
body -
result -
[direction]
Shoot a ray at a body, get back information about the hit.
Parameters:
-
bodyBody -
resultRaycastResult -
[direction]Vec3 optional
intersectBox
(
private
-
shape -
quat -
position -
body -
direction -
result
Parameters:
-
shapeShape -
quatQuaternion -
positionVec3 -
bodyBody -
directionVec3 -
resultRaycastResult
intersectConvex
(
private
-
shape -
quat -
position -
body -
direction -
result -
[options]
Parameters:
-
shapeShape -
quatQuaternion -
positionVec3 -
bodyBody -
directionVec3 -
resultRaycastResult -
[options]Object optional-
[faceList]Array optional
-
intersectHeightfield
(
private
-
shape -
quat -
position -
body -
direction -
result
Parameters:
-
shapeShape -
quatQuaternion -
positionVec3 -
bodyBody -
directionVec3 -
resultRaycastResult
intersectPlane
(
private
-
shape -
quat -
position -
body -
direction -
result
Parameters:
-
shapeShape -
quatQuaternion -
positionVec3 -
bodyBody -
directionVec3 -
resultRaycastResult
intersectShape
(
private
-
shape -
quat -
position -
body -
direction -
result
Parameters:
-
shapeShape -
quatQuaternion -
positionVec3 -
bodyBody -
directionVec3 -
resultRaycastResult
intersectSphere
(
private
-
shape -
quat -
position -
body -
direction -
result
Parameters:
-
shapeShape -
quatQuaternion -
positionVec3 -
bodyBody -
directionVec3 -
resultRaycastResult
reportIntersection
(
Boolean
private
-
normal -
hitPointWorld -
shape -
body -
result
Parameters:
-
normalVec3 -
hitPointWorldVec3 -
shapeShape -
bodyBody -
resultRaycastResult
Returns:
Boolean:
True if the intersections should continue
