Sets the current body to the given body. This will remove the previous body, if one already exists.
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. |
This TileBody object.