Function: raycast()
raycast(
bodies,start,end,sort):RaycastCollision[]
Defined in: physics/raycast.ts:13
Raycast function that returns an array of RaycastCollision objects that represent the intersections between a ray and the bodies in the world.
Parameters
bodies
The array of RigidBody objects to check for intersections
start
The starting point of the ray
end
The ending point of the ray
sort
boolean = true
Whether to sort the results by distance from the start point
Returns
An array of RaycastCollision objects