Contents

radialGravityField()

Creates a field node that accelerates physics bodies toward the field node.

Declaration

class func radialGravityField() -> SKFieldNode

Return Value

A new radial gravity field node.

Discussion

The strength of the field measures the acceleration of the field in meters per second squared. A positive number indicates that the body is accelerating toward the field node. The calculated force is proportional to the physics body’s mass (meaning that the acceleration applied to all affected physics bodies is a constant). The falloff property of a radial gravity field node is set by default to 2.

See Also

Creating Field Nodes