Is there a way to stop particles (ie rain) entering game object interiors?,How to stop rain leaking into structures?
Hope someone can help me. I saw quite a few topics about how to get particles to leave game objects but very little about the reverse process. So the issue is i bought a rain toolkit for unity. Unfortunately, the rain is hitting everywhere on the map, even inside building interiors where i don't want it. Is there a method to deflect particles and stop them entering game object interiors that are supposed to be sheltered? Somebody had suggested clicking on the convex box in the mesh collider component, but that didn't work, because the player controlled object could no longer enter the buildings.
Thanks for any help.
Answer by ifurkend · Nov 18, 2020 at 10:22 PM
You can control manipulate the collision setting in the Physics settings so your rain particle system only interacts with colliders of specific layer while others (e.g. characters) don’t.
https://docs.unity3d.com/Manual/LayerBasedCollision.html
For example, you create a new “Roof” layer, then create additional box collider child objects to define the roof shape of each building. In the rain particle system collision module, set which layer you want the rain particles to collide with. Ensure both roof colliders and rain particle system use the Roof layer. Finally adjust the Physics settings so only Roof layer interacts with itself.
Your answer
Follow this Question
Related Questions
Aoe potion with drag and drop? 0 Answers
how to activate a particle when bullet hits a collider? 1 Answer
Unity Spline Particle Emission 0 Answers
Particles Fade Near The Ground 1 Answer
Alpha blended particle has a black tint, how to fix? 0 Answers