applyForce(_:at:)
Applies a force to a specific point of a physics body.
Declaration
func applyForce(_ force: CGVector, at point: CGPoint)Parameters
- force:
A vector that describes how much force was applied in each dimension. The force is measured in Newtons.
- point:
A point in scene coordinates that defines where the force was applied to the physics body.
Discussion
Because the force is applied to a specific point on the body, it may impart both linear acceleration and angular acceleration. The force is applied for a single simulation step (one frame).