Contents

applyForce(_:)

Applies a force to the center of gravity of a physics body.

Declaration

func applyForce(_ force: CGVector)

Parameters

  • force:

    A vector that describes how much force was applied in each dimension. The force is measured in Newtons.

Discussion

This method accelerates the body without imparting any angular acceleration to it. The acceleration is applied for a single simulation step (one frame).

See Also

Applying Forces and Impulses to a Physics Body