O'Reilly logo

jMonkeyEngine 3.0 Cookbook by Rickard Edén

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a muzzle flash using ParticleEmitter

Weapons of some sort are a common feature of many games and muzzle flashes greatly enhance the appearance and feeling when you fire. This recipe will show a way to create good-looking muzzle flashes by tweaking a ParticleEmitter's properties. The following screenshot shows a texture with four muzzle flashes:

Creating a muzzle flash using ParticleEmitter

Getting ready

There are two things needed before we can begin work on the ParticleEmitter:

  • First of all we need a texture for the muzzle flash. This can have anything from one to several images of muzzle flashes. The texture should be gray scaled. We'll add color using ParticleEmitter.
  • Secondly, we need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required