Checks the given rectangular area to see if any vertices of the given bodies intersect with it.
Or, if the outside
parameter is set to true
, it checks to see which bodies do not
intersect with it.
If no bodies are provided it will search all bodies in the Matter World, including within Composites.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number |
The horizontal coordinate of the top-left of the area. |
||
y | number |
The vertical coordinate of the top-left of the area. |
||
width | number |
The width of the area. |
||
height | number |
The height of the area. |
||
outside | boolean | <optional> | false |
If |
bodies | Array.<Phaser.Types.Physics.Matter.MatterBody> | <optional> |
An array of bodies to check. If not provided it will search all bodies in the world. |
An array of bodies that intersect with the given area.