Creates a field that accelerates objects in a specific direction.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
A physics field object. To use the field in a scene, attach it to the
physics property of an
Because the force of gravity on an object is proportional to the object’s mass, this force accelerates all objects in the field’s area of affect by the same amount. The field’s
strength property measures this acceleration in meters per second per second.
By default, a linear gravity field accelerates objects in along its
direction vector. To make it accelerate objects in the opposite direction, set the field’s
strength property to a negative value.
falloff value for a linear gravity field is
0, indicating that the field’s effect is constant throughout its area of effect.