Unity3D: constraining particles
What if you need to keep your particles in line, like creating a stream of water which flows exactly inside the tube, or (in my case) steam from a locomotive that does not leave the tunnel through the solid roof? The solution is so elementary, you’ll flip when you see it.
This is what it looks like with unconstrained particles. There’s a steaming locomotive in this depot and it looks bad. It looks especially bad on mobiles, ’cause soft particles feature is deferred lighting only and DL will kill performance even on iPhone 5s (proven).
When Collision tab enabled, Shuriken applies same rules to every particle that contacts any collider. For example, Dampen value will be applied on contact, slowing your particles down. Bounce will, well, bounce them off. Lifetime loss will shorten lifetime of a particle, apparently. And if Min Kill Speed is zero, your particle will be just destroyed on contact.
That’s exactly what I did – added a flat thin box collider just under the roof. Notice steam still coming up from below roof but not through it?