Background: In-game player built buildings can be put up on the fly, in different sizes, shapes, mesh collider, non-mesh collider, almost no restrictions.
What we want: Rain that collides! When something is over your head it doesn’t fall onto you, that’s it. That means, a particle system that follows the player around in an open world.
Problem 1: particle collision needs to be set to high quality in order to collide with mesh colliders. This causes a massive CPU expense during a storm.
Possible solution: Create a separate physics layer specifically for rain, give each building piece/anything else that needs to collide a simple bounding box that only interacts with rain collisions. I just thought this up typing this, and am looking forward to trying this.
Problem 2: moving indoor and outdoor is of course open and is not statically defined. Either there is something over you or there isn’t. But what if the building is higher than the particle spawner. Too high and you can outrun the rain, this is in fact already a problem with my snow. Too low and your 9m+ high roof doesn’t stop the rain, now it’s raining indoors, discouraging players from building larger buildings and limiting me from designing larger PoIs with high ceilings.
Possible solution: create an array of smaller particle systems, for example 5x5 10m instead of 1x1 50m, that raycast upward to see if the sky is actually above them or they turn off.
Any other ideas? The simple method of high quality collision detection is just too limiting.