World:getGravity
EditReturns the World's gravity. Gravity is a constant acceleration applied to all colliders. The default is (0, -9.81, 0)
meters per second squared, causing colliders to fall downward.
Use Collider:setGravityScale
to change gravity strength for a single collider.
gx, gy, gz = World:getGravity()
Arguments
None
Returns
Name | Type | Description |
gx | number | The x component of the gravity force, in meters per second squared. |
gy | number | The y component of the gravity force, in meters per second squared. |
gz | number | The z component of the gravity force, in meters per second squared. |
Notes
Kinematic colliders ignore gravity, since they are not moved by forces. Colliders with higher mass do not fall faster.