Creates a new rigid rectangular Body and adds it to the World.
name | type | arguments | description |
---|---|---|---|
x | number |
The X coordinate of the center of the Body. |
|
y | number |
The Y coordinate of the center of the Body. |
|
width | number |
The width of the Body. |
|
height | number |
The height of the Body. |
|
options | Phaser.Types.Physics.Matter.MatterBodyConfig | <optional> |
An optional Body configuration object that is used to set initial Body properties on creation. |
A Matter JS Body.