Contents

particleMassVariation

The range, in kilograms, of randomized particle masses. Animatable.

Declaration

var particleMassVariation: CGFloat { get set }

Discussion

Setting a nonzero value for this property randomizes the effect of the particleMass property. SceneKit randomly adjusts the mass of each particle by up to half the particleMassVariation value. For example, if the particleMass value is 1.0 kilograms and the particleMassVariation value is 0.5 kilograms, each particle uses a random mass value between 0.75 and 1.25 kilograms for physics simulation.

The default value is 0.0 kilograms, specifying no randomization.

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

See Also

Simulating Physics for Particles