0

I am using Libgdx ParticleEffect to draw a fire particle effect .

The issue I have is that when I try to render a ParticleEffect at two different locations within single game loop, only the last draw call has the effect drawn on screen. I update the Particle effect only once per game loop but set its position to two distinct locations and draw it. Is this a trivial problem with Libgdx ParticleEffect.

ParticleEffect effect = new PartcleEffect();
effect.load(gdx.files.internal("data/effect.particle"),atlas,"");
effect.start();

in render :

effect.update(deltaTime);

effect.setPosition(x1,y1);
effect.draw(batch);

effect.setPosition(x2,y2);
effect.draw(batch);
Rahul Verma
  • 2,140
  • 3
  • 21
  • 31
  • If you remove/comment the first draw (or even better switch them), will the second work properly? – kajacx Aug 11 '14 at 17:30

1 Answers1

0

You need two particle effect generator. One for each instance.

Julien
  • 1,028
  • 9
  • 18