Contents

magnitude

The magnitude of the gravity vector.

Declaration

var magnitude: CGFloat { get set }

Discussion

Modify this property when you want to change the magnitude of the gravity vector separately from the angle of that vector. A magnitude value of 1.0 represents an acceleration of 1000 points / second² at the specified angle, which roughly approximates the force of Earth’s gravity. The value in this property is tied to the value in the gravityDirection property, so changes in one affect the other.

The default value of this property is 1.0.

See Also

Configuring a gravity behavior