Sets the size of the Static Body.
When center
is true, also repositions it.
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 Static 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 Static 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 |
Place the Static Body's center on its Game Object's center. Only works if the Game Object has the |
This Static Body object.