Constructor for a new Ray
Current, user-provided result callback. Will be used if mode is Ray.ALL.
Set to true if you want the Ray to take .collisionResponse flags into account on bodies and shapes.
Collision group.
-1
Collision mask.
-1
The direction of the ray
Ray start point.
Length of the ray
The intersection mode.
If set to true, the ray skips any hits with normal.dot(rayDirection) < 0.
Ray end point
Static
ALLThis raycasting mode will traverse all intersection points and executes a callback for each one.
Static
ANYThis raycasting mode will make the Ray stop when it finds the first intersection point.
Static
CLOSESTThis raycasting mode will make the Ray traverse through all intersection points and only return the closest one.
Get the AABB of the ray.
An array of Body objects.
Shoot a ray at a body, get back information about the hit.
Shoot a ray at a shape, get back information about the hit
A line with a start and end point that is used to intersect shapes.
See
raycast for example usage