Phaser API Documentation

  Version: 
remove(object, [deep])

Description:

Removes a Matter JS object, or array of objects, from the world.

The objects should be valid Matter JS entities, such as a Body, Composite or Constraint.

Triggers beforeRemove and afterRemove events.

Parameters:

name type arguments Default description
object object | Array.<object>

Can be single object, or an array, and can be a body, composite or constraint.

deep boolean <optional> false

Optionally search the objects children and recursively remove those as well.

Returns:
Description:

This Matter World object.

Since: 3.0.0