Phaser API Documentation

  Version: 
overlap(target)

Description:

Takes either a Rectangle Geometry object or an Arcade Physics Body and tests to see if it intersects with any currently alive Particle in this Emitter.

Overlapping particles are returned in an array, where you can perform further processing on them. If nothing overlaps then the array will be empty.

Parameters:

name type description
target Phaser.Geom.Rectangle | Phaser.Physics.Arcade.Body

A Rectangle or Arcade Physics Body to check for intersection against all alive particles.

Returns:
Description:

An array of Particles that overlap with the given target.

Since: 3.60.0