Particle effects are used to visually enhance games. You can use them to create explosions, blood splatter, trails, weather or any other effect.
Particle effects consists of a number of emitters and optional modifiers:
Select New… ▸ Particle FX from the context menu in the Assets browser. Name the new particle effect file. The editor will now open the file using the Scene Editor.
The Outline pane shows the default emitter. Select the emitter to bring up its properties in the Properties pane below.
To add a new emitter to the effect, right click the root of the Outline and select Add Emitter ▸ [type] from the context menu. Note that you can change the type of the emitter in the emitter properties.
To add a new modifier, right click the location of the modifier in the Outline (the effect root or a particular emitter) and select Add Modifier, then select the modifier type.
A modifier that sits on the effect root (not childed to an emitter) affects all particles in the effect.
A modifier that is added as a child to an emitter affects only that emitter.
When editing an emitter or modifier the result is immediately visible in the editor, even with the effect paused:
Emitter identifier (used when setting render constants for specific emitters).
Transform of the emitter relative the ParticleFX component.
Controls how the emitter plays:
Oncestops the emitter after reaching its duration.
Looprestarts the emitter after reaching its duration.
Controls how flipbook animations will be sized:
Autokeeps the size of each flipbook animation frame to the source image.
Manualsets the particle size according to the size property.
Which geometrical space the spawned particles will exist:
Worldmoves the particles independent of the emitter.
Emittermoves the particles relative to the emitter.
The number of seconds the emitter should emit particles.
The number of seconds the emitter should wait before emitting particles.
The number of seconds into the particle simulation the emitter should start, or in other words how long the emitter should pre-warm the effect for.
The image file (Tile source or Atlas) to use for texturing and animating the particles.
The animation from the Image file to use on the particles.
The material to use for shading the particles.
Available blend modes are
How many particles originating from this emitter that can exist at the same time.
The shape of the emitter
Circle emits particles from a random location inside a circle. The particles are directed outwards from the center. The circle diameter is defined by Emitter Size X.
2D Cone emits particles from a random location inside a flat cone (a triangle). The particles are directed out of the top of the cone. Emitter Size X defines the width of the top and Y defines the height.
Box emits particles from a random location inside a box. The particles are directed up along the box’ local Y-axis. Emitter Size X, Y and Z defines width, height and depth respectively. For a 2D rectangle, keep the Z size at zero.
Sphere emits particles from a random location inside a sphere. The particles are directed outwards from the center. The sphere diameter is defined by Emitter Size X.
Cone emits particles from a random location inside a 3D cone. The particles are directed out through the top disc of the cone. Emitter Size X defines the diameter of the top disc and Y defines the height of the cone.
How the emitted particles are oriented:
Defaultsets the orientation to unit orientation
Initial Directionkeeps the initial orientation of the emitted particles.
Movement Directionadjusts the orientation of the particles according to their velocity.
A scale value of how much of the velocity of the emitter the particles should inherit. This value is only available when Space is set to
World. The velocity of the emitter is estimated every frame.
Check to scale any particle stretch in the direction of movement.
These properties have two fields: a value and a spread. The spread is a variation which is applied randomly for each spawned particle. E.g. if the value is 50 and the spread is 3, each spawned particle will get a value between 47 and 53 (50 +/- 3).
By checking the key button, the value of the property is controlled by a curve over the duration of the emitter. To reset a keyed property, uncheck the key button.
The Curve Editor (available among the tabs in the bottom view) is used to modify the curve. Keyed properties can’t be edited in the Properties view, only in the Curve Editor. Click and drag the points and tangents to modify the shape of the curve. Double-click on the curve to add control points. To remove a control point, double click on it.
To auto-zoom the Curve Editor to display all curves, press F.
The following properties can be keyed over the play time of the emitter:
Automaticand use a flipbook animation as image source, this property is ignored.
The following properties can be keyed over the life time of the particles:
There are four types of modifiers available that affect the velocity of particles:
Acceleration in a general direction.
Reduces the acceleration of particles proportional to the particle velocity.
Either attracts or repels particles towards/from a position.
Affects particles in a circular or spiraling direction around its position.
To start and stop a particle effect from a script:
-- start the effect component "particles" in the current game object particlefx.play("#particles") -- stop the effect component "particles" in the current game object particlefx.stop("#particles")
See the Particle FX reference documentation for more information.