Sets the worlds gravity to the values given.
Gravity effects all bodies in the world, unless they have the ignoreGravity
flag set.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number | <optional> | 0 |
The world gravity x component. |
y | number | <optional> | 1 |
The world gravity y component. |
scale | number | <optional> | 0.001 |
The gravity scale factor. |
This Matter World object.