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.
Collision mask.
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
This raycasting mode will traverse all intersection points and executes a callback for each one.
This raycasting mode will make the Ray stop when it finds the first intersection point.
This 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
Should be called if you change the from or to point.
A line with a start and end point that is used to intersect shapes.
World.raycast for example usage