Contents

turbulenceField(smoothness:animationSpeed:)

Creates and returns a field behavior object that applies noise to an item in motion.

Declaration

class func turbulenceField(smoothness: CGFloat, animationSpeed speed: CGFloat) -> Self

Parameters

  • smoothness:

    The smoothness of the turbulence field. Specify a value between 0.0 and 1.0, where 0.0 indicates the maximum amount of randomness in the generated field and 1.0 indicates the least amount of randomness.

  • speed:

    The frequency at which the turbulence field changes, measured in Hertz (Hz). Specify 0.0 to create a turbulence field that does not change over time.

Return Value

A field behavior object that applies turbulence to an item in motion.

Discussion

The strength of the noise generated by this field is proportional to the velocity of the item in the field.

See Also

Getting the field behaviors