# global.gravity

Syntax

## Vector Access

v = global.gravity(<i>)
global.gravity(<i>) = v

Get/set the gravity.

Returns: v - gravity vector or component v - gravity vector or component i - optional vector component

## Component Access

f = global.gravity.x()
global.gravity.x() = f

Get/set the $$x$$-component of the gravity.

Returns: f - $$x$$-component of the gravity vector f - $$x$$-component of the gravity vector
f = global.gravity.y()
global.gravity.y() = f

Get/set the $$y$$-component of the gravity.

Returns: f - $$y$$-component of the gravity vector f - $$y$$-component of the gravity vector
f = global.gravity.z() (3D only)
global.gravity.z() = f (3D only)

Get/set the $$z$$-component of the gravity.

Returns: f - $$z$$-component of the gravity vector f - $$z$$-component of the gravity vector