World:rayCast

Available since LÖVE 0.8.0
This method is not supported in earlier versions.

Casts a ray and calls a function with the fixtures that intersect it.

Function

Synopsis

World:rayCast( x1, y1, x1, y1, callback )

Arguments

number x1
The x position of the starting point of the ray.
number y1
The y position of the starting point of the ray.
number x2
The x position of the end point of the ray.
number y2
The y position of the end point of the ray.
function callback
This function gets six arguments and should return a number.

Returns

Nothing.

See Also


Other Languages