Sizes and positions this Body, as a rectangle.
Modifies the Body offset
if center
is true (the default).
Resets the width and height to match current frame, if no width and height provided and a frame is found.
name | type | arguments | Default | description |
---|---|---|---|---|
width | number | <optional> |
The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width. |
|
height | number | <optional> |
The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height. |
|
center | boolean | <optional> | true |
Modify the Body's |
This Body object.