- Home /
Particle emission on particle collision
Im making a 2D platformer. When the player dies, red blood particles shoot out. When they collide with a wall, I set them to be destroyed atm, because I cant find a way to completely stop particles on collision. (Dampen doesn't turn off gravity.) This problem seems to correlate with my new problem. I want another particle effect to be emitted at the collision points of my particles, so I can make blood dribble from the collision points.
How do I script this??
Reference GIF:
Also, the particle trails doesn't start from the center of the particle emission, but the particles do. How's this, and how can I fix it, so the trails begin from the center?
Answer by ifurkend · Apr 21, 2019 at 03:31 PM
To kill the particle on collision, you just set one "Lifetime Loss", or if you don't mind the trouble of assigning the wall collider in exchange for better performance, use Trigger Module and set "kill" action.
For the trails, unfortunately this is a known issue and the only workaround in case you're using the hemisphere emitter shape:
Multiply your Start Speed by -1.
Set zero Thickness of your hemisphere emitter shape.
Set proper radius until the trails appears just from the center.
Adjust the rotation of the emitter shape so the particles are emitted in the desired direction again.
You may also need to use Size or Color over Lifetime curve/gradient to sync the particles with the trails if you're a perfectionist.
If you use the Circle emitter shape, it's the similar idea but set the arc with 180deg.
I like the way the hemisphere looks, so that solves that. And the 'Lifetime Loss' was a way better way of handling particle kills, than I originally did. But that doesn't quite cover my main problem. I would like to Instatiate subparticles on the particle collisions. How to I get the positions of the collisions?
If you're gonna use the same trail for the dripping blood, then there is no need to spawn a sub emitter on collision, but use near 1 dampen to halt the splash motion and let gravity modifier pull it down. I can see that one may burst a single splatter billboard particle on collision with the wall, but really that's it.
Is the trails thing a bug? Was it reported? Report it and I will fix :) or tell me a case number and I’ll see why I haven’t heard about it.. thanks!
I believe you can still use either Collision or Death conditions to spawn your sub emitters or even send collision message for scripting when it is killed by Lifetime Loss in the Collision module.
Your answer
Follow this Question
Related Questions
How to keep particles moving past an obstacle after they have collided with it? 3 Answers
Unity 2D Particle System's collider doesn't trigger other colliders for scripts. 0 Answers
Which particle system does unity use? 0 Answers
Make Start Color setting in particle system control _EmissionColor 1 Answer
Particle system not outputting what it's supposed to. 0 Answers