Time for action – stir up some dust
A speeding car looks faster with rally stripes, but it looks twice as fast when it also stirs up some dust!
- Make a copy of
Main.java
and name the classParticle1DustSmoke.java
. Remember to also refactor the first line of themain()
method toParticle1DustSmoke app = new Particle1DustSmoke();
. - Copy the included file
assets/Effects/smoke.png
into your project'sassets/Effect
directory. It includes a sprite animation of a dust cloud. - Create a class field for the
ParticleEmitter
object and initialize the emitter in thesimpleInitApp()
method. Give the emitter a descriptive name and tell it to keep 100 particles of typeTriangle
ready (from thecom.jme3.effect.ParticleMesh.Type
package).private ParticleEmitter dustEmitter; ...
Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.