Phaser API Documentation

  Version: 
setBody(body, [addToWorld])

Description:

Sets the current body to the given body. This will remove the previous body, if one already exists.

Parameters:

name type arguments Default description
body MatterJS.BodyType

The new Matter body to use.

addToWorld boolean <optional> true

Whether or not to add the body to the Matter world.

Returns:
Description:

This TileBody object.

Since: 3.0.0