- Home /
Fake Animate Particle Emitter
Hello,
I'm trying to animate the particles in a system to compensate for the transform that the system is attached to jumping from one place to another and taking the whole system with it. I would love to be able to directly control the emitter but couldn't see how, so i'm trying to offset the new position by the old using getParticles,
function fireParticles (emission : int, newPosition : Vector3){
var particles = new ParticleSystem.Particle[20]; var oldParticles = hitParticles.GetParticles(particles);
for (var i = 0; i < oldParticles; i++) {
print("old" + particles[i].position); particles[i].position -= newPosition; print("new" + particles[i].position); }
hitParticles.transform.position = newPosition; hitParticles.Emit(emission);
}
The print statements tell me that the position is changing, although this might just be the normal trajectory of the particle.
Any ideas would be greatly appreciated.
Thanks
Simon.
Your answer
Follow this Question
Related Questions
Mesh Particle Emitter & Animation 0 Answers
Make Mesh Particles go Outward 1 Answer
How can I make animated background image? 1 Answer