Hello, i have a little problem with particle system.
When i use the RelativeParticleSystemNode it works but i don't like the way it looks : when the model turn all the particles already produced turns with it. I decided to use the AbsoluteParticleSystemNode because i hope it will resolve this problem.
The problem is : when i replace RelativeParticleSystemNode by AbsoluteParticleSystemNode : no particles seems to be produced.
Can you see where i am wrong ?
public ParticleSysItem(GraphicsCore GCore, ParticleSystem ps)
{
this._pSys = ps;
//this._pSysNode = new RelativeParticleSystemNode();
this._pSysNode = new AbsoluteParticleSystemNode();
TransformationDirectives rotDirecs = new TransformationDirectives( -0.0f, 0.0f, 0.0f );
TransformationDirectives transDirecs = new TransformationDirectives( 0.0f, 0.0f, 0.0f );
this._trans = new TranslatableGroup( transDirecs );
GCore.getAnimator().addAnimatableObject( this._trans );
this._rg = new RotatableGroup( rotDirecs );
this._trans.addChild(this._rg);
this._rg.addChild( this._pSysNode );
this._pSysNode.setShowGeneratorsAndPointMasses( true );
this._pSysNode.setParticleSystem( this._pSys );
}
public TranslatableGroup getPGroup()
{
return this._trans;
}
public void addNewParticleSystem(RotatableGroup mother, String name, int id)
{
String handle = getPSHandle( name );
if ( handle == null )
return;
ParticleSystem ps = this._pManager.getCopyAttached( handle );
ps.getModifiers().add( this._pm );
ParticleSysItem pItem = new ParticleSysItem(this._GCore, ps);
mother.addChild( pItem.getPGroup() );
this._particleSystemNodes.put( id, pItem);
return ;
}
// When create a model, i call this line : this._rg is the node of the model
GCore._pSysManager.addNewParticleSystem(this._rg, "test", this._oInf._id);
Thanks