The wizard node (particle problem)

i'm totally confused. this code creates a simple explosion:

protected AbstractEntity initEffect() {
    AbstractEntity l_entity = createEffect();
    l_entity.getLocalTranslation().set(getOwner().getWorldCenter());
    if (m_mesh == null) {
      ParticleType l_type = Utils.findEnum(ParticleType.values(), m_props.getProperty("spell.particletype"));
      m_mesh = l_type.create(this);
    }
    l_entity.attachChild(m_mesh.get0());
    l_entity.attachChild(m_emitter);
    m_emitter.setLocalTranslation(m_mesh.get0().getLocalTranslation());
    l_entity.afterCreation();
    updateEffectBounds(l_entity);
    return l_entity;
  }

  protected AbstractEntity createEffect() {
    return new AbstractEntity(getEngine());
  }


  protected final Geometry m_emitter = new Sphere("Particle emitter", 6, 6, 1.5F);
  //protected final Geometry m_emitter = new Box("Particle emitter", new Vector3f(), 10.0F, 10.0F, 10.0F);

  {
    m_emitter.setCullMode(CULL_NEVER);
    m_emitter.setIsCollidable(false);
  }



consider abstractentity as being a node, there's no difference in this case. everything seems fine until i added a collision check. when rendering the bounds, i see the bounds of one invisible sphere flying straight up. it is m_emitter ( i can see the sphere or box when i turn culling off).
i wouldn't care about all this if this sphere didn't mess up the bounds of my abstractentity - it tries to surround the explosion itself and the additional moving node. why is it moving?

if i don't add the particle mesh to my abstract entity, the emitter sphere or box stays where it is meant to be.

Hard to answer your question with just the data/code you provide but it sounds a bit like your entity object might be incorrectly applying transforms?  Check the local and world transform values of your sphere and above for sanity.

i'm having a stranger problem with particles too … when i set the Model Bound


pMesh.setModelBound(new BoundingSphere());



two bounding spheres appears...

Did you updated the bounds by means of the updateModelBound method?

solved it. but i too saw that mysterious second (in my case third) sphere a few times. couldn't reproduce it :confused: