I am simulating a spotlight using particles. the particles spread at a 10degree angle, and are contained within a container together with a sprite that is 1x1 pixel in size.
The 1x1 sprite is used to trace a path in the world, and every time it collides with anything, particles are generated using the one shot method.
1) the system deletes the particle automatically once the one-shot is complete done, which in turn deletes my 1x1 sprite. This is not the behavior I desire.
2) I need a way to delete the particles associated with a given emitter at any time. The idea is that I would have my 1x1 sprite and the particles moving at the same speed, when the 1x1 sprite collides with anything, I will delete the old particles and spawn a new one-shot emitter in the new direction.
Unfortunately, I have not been able to delete any generated particles. This must also be done in a way that leaves the emitter in tact, so the 1x1 sprite stays alive
Any help would be appreciated. Thanks.