I'm sure you didn't look up the code. It works pretty well.
1. Point Emitter:
The Particle structure is created just once and that is upon the creation of the emitter class.
2. ParticleSystemNode:
now the CParticleSystemNode calls the emitt() method:
Code: Select all
s32 newParticles = Emitter->emitt(now, timediff, array);
3. Point Emitter:
inside the emitt() method the particle structure is passed back as a reference to the doParticleSystem() method of the CParticleSystemNode.
4. ParticleSystemNode:
later in the doParticleSystem() method the array
.pos vector is being altered,
Code: Select all
if (ParticlesAreGlobal)
AbsoluteTransformation.transformVect(array[i].pos);
which is identical to the Point Emitter Particle member.
unless i'm a totally idiot and incapable of reading clean written code i claim that not resetting the particle.pos to (0,0,0) is a bug, and resetting it for each particle is one of the possible fixes. =P