Contents

particleChargeVariation

The range, in coulombs, of randomized particle charges. Animatable.

Declaration

var particleChargeVariation: CGFloat { get set }

Discussion

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

The default value is 0.0 coulombs, specifying no randomization.

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

See Also

Simulating Physics for Particles