gravityOverride property

Vector2? gravityOverride
getter/setter pair

Changes how the World treats the gravity for this body.

Specifying a gravityOverride overrides the world's gravity. For example, if World.gravity is (0, -10), and a body has a gravityOverride of (0, 0) the body will behave as if the world does not have a gravity.

If you wish to modify the gravity relative to the world, use World.gravity as part of the calculation. However, if you only wish to scale it, use gravityScale instead.

Implementation

Vector2? gravityOverride;