Creates a new physics Body with the given position and size.
This Body is not associated with any Game Object, but still exists within the world and can be tested for collision, have velocity, etc.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number |
The horizontal position of this Body in the physics world. |
||
y | number |
The vertical position of this Body in the physics world. |
||
width | number | <optional> | 64 |
The width of the Body in pixels. Cannot be negative or zero. |
height | number | <optional> | 64 |
The height of the Body in pixels. Cannot be negative or zero. |
The Body that was created.