User-provided result callback. Will be used if mode is Ray.ALL.
Set to false
if you don't want the Ray to take collisionResponse
flags into account on bodies and shapes.
true
collisionFilterGroup
-1
collisionFilterMask
-1
direction
from
Will be set to true
during intersectWorld() if the ray hit anything.
The intersection mode. Should be Ray.ANY, Ray.ALL or Ray.CLOSEST.
RAY.ANY
The precision of the ray. Used when checking parallelity etc.
0.0001
Current result object.
If set to true
, the ray skips any hits with normal.dot(rayDirection) < 0.
false
to
Static
ALLALL
Static
ANYANY
Static
CLOSESTCLOSEST
Optional
options: { Optional
options: { Optional
options: { Optional
faceOptional
options: { Optional
options: { Optional
faceOptimize by transforming the world to local space first.
Use Octree lookup
Get the world AABB of the ray.
Shoot a ray at an array bodies, get back information about the hit.
An array of Body objects.
Optional
result: RaycastResultset the result property of the Ray instead.
Shoot a ray at a body, get back information about the hit.
Optional
result: RaycastResultset the result property of the Ray instead.
Do itersection against all bodies in the given World.
True if the ray hit anything, otherwise false.
Static
pointAs per "Barycentric Technique" as named here but without the division
A line in 3D space that intersects bodies and return points.