Sets the velocity of the Body.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number |
The horizontal velocity of the body, in pixels per second. Positive values move the body to the right, while negative values move it to the left. |
||
y | number | <optional> | x |
The vertical velocity of the body, in pixels per second. Positive values move the body down, while negative values move it up. |
This Game Object.