World:queryShapesInArea

Available since LÖVE 12.0
It has replaced World:queryBoundingBox.

Calls a function for each Shape inside the specified area by searching for any overlapping bounding box (Shape:getBoundingBox).

Function

Synopsis

World:queryShapesInArea( topLeftX, topLeftY, bottomRightX, bottomRightY, callback )

Arguments

number topLeftX
The x position of the top-left point.
number topLeftY
The y position of the top-left point.
number bottomRightX
The x position of the bottom-right point.
number bottomRightY
The y position of the bottom-right point.
function callback
This function gets passed one argument, the Shape, and should return a boolean. The search will continue if it is true or stop if it is false.

Returns

Nothing.

See Also

Other Languages