Setting position of particle effect affects emitters right?
by Rob Segal · in Torque Game Builder · 07/05/2006 (9:51 pm) · 3 replies
When setting the position of a particle effect I don't have to set the position on all the emitters for that effect as well right? Seems reasonable and I have injected some echo commands into my scripts that indicate that is indeed happening but the emitter I have for the effect remains in the same position all the time. Would there be a reason anyone can think of for this? Perhaps a flag or setting on the emitter?

Torque Owner Rob Segal
The current script...
%effect = new t2dParticleEffect() { scenegraph = sgMain; }; %effect.setPosition(KittyTorso.getPosition()); %effect.loadEffect("~/data/particles/KittyParticles.eff"); %effect.playEffect();This will constantly display the particle effect in the same position. If you query the effect for it's position it will tell you it's changing according to the value of the KittyTorso object. Not expected behavior! The call to setPosition needs to happen after the call to loadEffect. Wasn't necessarily what I was expecting but it makes some sense.The revised working script...
%effect = new t2dParticleEffect() { scenegraph = sgMain; }; %effect.loadEffect("~/data/particles/KittyParticles.eff"); %effect.setPosition(KittyTorso.getPosition()); <-- setPosition now after loadEffect %effect.playEffect();