gravity property

Vector2 gravity

The current World's gravity.

All bodies are affected by gravity; unless the Body has a specified Body.gravityOverride. If so, Body.gravityOverride is used instead of gravity.

See also:

Implementation

Vector2 get gravity => _gravity;
void gravity=(Vector2 gravity)

Changes the World's gravity.

All bodies are affected by gravity; unless the Body has a specified Body.gravityOverride. If so, Body.gravityOverride is used instead of gravity.

See also:

Implementation

set gravity(Vector2 gravity) => this.gravity.setFrom(gravity);