turbulenceField(withSmoothness:animationSpeed:)
Creates a field node that applies a randomized acceleration to physics bodies.
Declaration
class func turbulenceField(withSmoothness smoothness: CGFloat, animationSpeed speed: CGFloat) -> SKFieldNodeParameters
- smoothness:
The smoothness of the noise used to generate the forces. This parameter should be a value between
0.0and1.0, where1.0represents a uniform smoothness. - speed:
The speed at which the noise field should change. A value of
0.0means that the field should not animate at all.
Return Value
A new turbulence field node.
Discussion
The acceleration’s magnitude is proportional to a body’s velocity.