Phaser API Documentation

  Version: 
has(body)

Description:

Returns true if the given body can be found within the World.

Parameters:

name type description
body MatterJS.Body | Phaser.GameObjects.GameObject

The Matter Body, or Game Object, to search for within the world.

Returns:
Description:

An array of all the Matter JS Bodies in this World.

Type:
  • Array.<MatterJS.BodyType>
Since: 3.22.0