PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

SpreadAngle

ParticleEmitter

Vector2

The SpreadAngle property determines the random angles that a particle may be emit. On emission, a random angle is selected uniformly using the range defined by SpreadAngle. For example, if the ParticleEmitter/EmissionDirection is Top (+Y), then this DataType/Vector2 describes the size of the random angle spread on the X/Z axes, in degrees. The particle is given a velocity based on the ParticleEmitter/Speed in the chosen direction.

Below is an animation of two default ParticleEmitters. The foreground (closer) emitter has one of its SpreadAngle axes set to 90 degrees, so particles are emit randomly in an arc.
Two default ParticleEmitters. The foreground (closer) emitter has one axis of SpreadAngle set to 90 degrees

Setting one axis to 360 will cause particles to emit in all direction in a circle. Setting both to 360 will cause particles to emit in all directions in a sphere.


Code Samples


Creating a Particle Emitter from Scratch

This rather lengthy code sample shows how every property of a ParticleEmitter can be set, including DataType/NumberRange, DataType/NumberSequence and DataType/ColorSequence properties. Below is how the ParticleEmitter should after every property is set. Try playing around with the different properties to customize how the effect looks!

The final product