26-09-2020, 02:20 PM
Good Morning,
I am having an issue that I am hoping to get some help on.
- I have a collider that will destroy individual particles when collision takes place. I need to Disable, Kill, change Life of the singular particle so that it doesn't go back into the pool and get re-emitted.
Scenario: Barrel tips over, at certain angle emitter speed goes up, emission begins. The particles that have been emitted and then collided with get "cleaned" up and in this process, destroyed and prevented from going back into the emitter pool.
Just having trouble with the code line for disabling the particles from the pool that have been collided with.
Thanks!
What i have thus far:
if(collider.tag == "ParticleKiller")
{
// do something with the collider.
int killThisParticle = solver.particleToActor[contact.particle].indexInActor;
emitter.KillParticle(killThisParticle);
// get particle indices and
//disable from active emitter
}
I am having an issue that I am hoping to get some help on.
- I have a collider that will destroy individual particles when collision takes place. I need to Disable, Kill, change Life of the singular particle so that it doesn't go back into the pool and get re-emitted.
Scenario: Barrel tips over, at certain angle emitter speed goes up, emission begins. The particles that have been emitted and then collided with get "cleaned" up and in this process, destroyed and prevented from going back into the emitter pool.
Just having trouble with the code line for disabling the particles from the pool that have been collided with.
Thanks!
What i have thus far:
if(collider.tag == "ParticleKiller")
{
// do something with the collider.
int killThisParticle = solver.particleToActor[contact.particle].indexInActor;
emitter.KillParticle(killThisParticle);
// get particle indices and
//disable from active emitter
}