global.gravity

Syntax

Vector Access

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

Get/set the gravity.

Returns:v - gravity vector or component
Accepts:v - gravity vector or component
Arguments: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
Accepts: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
Accepts: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
Accepts:f - \(z\)-component of the gravity vector