Game Development Reference
In-Depth Information
The Position Range property defines the area in which the emitted particles are created.
The particles are created within a rectangle defined by the Position Range property's X
and Y values.
To see how this works, go back to the MySparkParticle.sks file and change the
Position Range property's X value to 300 and the Y value to 300 and watch how this af-
fects the emission of the particles. You will now see the particles are being emitted in a
300-by-300 box. Play around with these properties until you are comfortable with how
they work.
The Angle Property
The next particle movement property is the Angle property. The Angle property defines
the angle at which particles travel away from the creation point in counterclockwise de-
grees. There are two Angle values: Start and Range.
The Start value defines the direction, in degrees, that a particle is emitted, and the Range
value defines the number of degrees, plus or minus half of the number value, that the
particle's initial angle varies. This all sounds complicated, so let's play around with these
values and see what happens.
If you look at the initial value of the spark emitter's Angle property, you will see that it is
roughly 90 degrees, and the Range property is set to roughly 360 degrees. The easiest way
to see how these values affect particle emission is to set both the Start and Range values.
Currently, Range is set to 360 degrees, which says the particle emission range is a com-
plete circle. Reduce the Range value to 90 degrees, set the Start value to 0 degrees, and
see what happens. You will now see that the particles start out being emitted to the right of
the screen and spread out to roughly 45 degrees above and below their initial emission
point.
Now increase the Start value to 90 degrees. Notice how the particles are now beginning
their life being emitted straight up. Increase the Start value by another 90 degrees, making
it 180 degrees. This time the particles are being emitted to the left side of the screen. After
playing around with these values, you will see that the Start value goes from 0 to 360 de-
grees counterclockwise around the center of the emission point and spreading out from the
Start value by half the value of the Range value.
The Speed Property
The Speed property is pretty straightforward. It defines the initial speed a particle moves
at creation. You specify the initial speed using the Start value, and then you can use the
Search WWH ::




Custom Search