Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number |
The horizontal acceleration |
||
y | number | <optional> | x |
The vertical acceleration |
This Game Object.