Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect.
If only one value is provided, this value will be used for both the X and Y axis.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number |
The gravitational force to be applied to the X-axis. |
||
y | number | <optional> | x |
The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used. |
This Game Object.
Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect.
name | type | description |
---|---|---|
x | number |
The gravitational force to be applied to the X-axis. |
This Game Object.
Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect.
name | type | description |
---|---|---|
y | number |
The gravitational force to be applied to the Y-axis. |
This Game Object.