Hey,
so im trying to add some Particles to my Game.
Ive done it according to the wiki and this post :
http://www.java-gaming.org/index.php?topic=29484.0
I get the Particles displayed where i want them, but i fail at rotating them.
I basicly have a function that Starts the Engine of the player, called by “w” for example.
in there i did the following :
PooledEffect effect = bombEffectPool.obtain();
effect.setPosition(sprite.getX(),sprite.getY());
for (int j = 0; j < effect.getEmitters().size; j++) {
effect.getEmitters().get(j).getAngle().setLow(MathUtils.degreesToRadians * body.getRotation()); //low is the minimum rotation
effect.getEmitters().get(j).getAngle().setHigh(MathUtils.degreesToRadians * body.getRotation()); //high is the max rotation
effect.getEmitters().get(j).getRotation().setLow(sprite.getRotation());
effect.getEmitters().get(j).getRotation().setHigh(sprite.getRotation());
effect.update(Gdx.graphics.getDeltaTime());
}
effects.add(effect);
First i only did the rotation part in there, after that only the angle part, and now both, and no matter which of them i use, the particles doesnt rotate, not even a tiny bit.
they get draw with :
for (int i = effects.size - 1; i >= 0; i--) {
PooledEffect effect = effects.get(i);
effect.draw(this.getSpriteBatch(), Gdx.graphics.getDeltaTime());
if (effect.isComplete()) {
effect.free();
effects.removeIndex(i);
}
}
why is this happening ?