Phaser API Documentation

  Version: 
<static> Overlaps(rectA, rectB)

Description:

Checks if two Rectangles overlap. If a Rectangle is within another Rectangle, the two will be considered overlapping. Thus, the Rectangles are treated as "solid".

Parameters:

name type description
rectA Phaser.Geom.Rectangle

The first Rectangle to check.

rectB Phaser.Geom.Rectangle

The second Rectangle to check.

Returns:
Description:

true if the two Rectangles overlap, false otherwise.

Type:
  • boolean
Since: 3.0.0