When the enemy node is detected as have been removed from the main enemy node (like after being shot), I remove the enemy from the main enemy node and trigger an explosion (using the palette explosion code). When the explosion has 0 particles, I finally remove the enemy instance from an enemy List.
I’ve tested the code using println(), and everything seems to be functioning correctly (the ParticleEmitter even registered as having particles), except there are no visible particles.
I know that my ParticleEmitter is attached to the rootNode through a few other nodes (main enemy node and environment node).
ArrayList<Badguy> removables = new ArrayList<>();
//System.out.println(badguyList.size());
for (Badguy i : enemyList) {
i.setMove(enviro);
i.move();
i.doExplosion(assetManager, enemyNode);
i.cleanExplosion(enemyNode);
if (i.purge()) removables.add(i);
}
if (!removables.isEmpty()) for (Badguy i : removables) {
enemyList.remove(i);
}
EnemyNode is directly attached to the rootNode, and is never removed from it. The magical exploNode is attached to enemyNode (which is constant). And yes, I know for a fact that exploNode is attached to enemyNode.
Edit: Sorry, when I said “Enemy class” I meant “Badguy class”
Maybe try posting this code that is only relevent to the ParticleEmitter into a quick new BasicGame template with the blue cube, and see if it renders properly there.
At first glance, your code for the particle emitter looks correct. The only thing to make sure of is that your custom texture named “fiery” is indeed a 3x3 texture atlas.
Edit: I also notice you aren’t setting a startSize or an endSize. I’m not sure if you scale up your particleEmitter elsewhere by scaling the parent node - but i think it could also be possible that your particle emitters are too small to be noticed depending on the scale of the rest of your world, since its all relative.
Or as Paul mentioned, it could be a node attachment issue.