Contents

particleVelocityVariation

The range, in units per second, of randomized initial particle speeds. Animatable.

Declaration

var particleVelocityVariation: CGFloat { get set }

Discussion

Setting a nonzero value for this property randomizes the effect of the particleVelocity property. SceneKit randomly adjusts the initial speed of each particle by up to half the particleVelocityVariation value. For example, if the particleVelocity value is 10.0 units per second and the particleVelocityVariation value is 5.0 units per second, newly spawned particles have random velocities between 7.5 and 12.5 units per second.

The default value is 0.0 units per second, specifying no randomization.

You can animate changes to this property’s value. See Animating SceneKit Content.

See Also

Managing Particle Motion