So I'm making a disasters game, and I want an "Acid Rain" disaster. Basicaly what I want happening it that it starts raining (already done), and the BaseParts, which are not covered (such as roofs, etc.) start turning green and then disappearing. The problem is - how do I figure out which parts are not covered?
Normally, the solution would be simple - use raycasting. But raycasting is expensive, so it would cause a lot of lag. Then, I could filter raycasting - what I mean is, I put a ray only above each part, and i could ignore parts that are already green, or parts that have been marked as "Covered" or something. However, I think this is also quite expensive and would cause lag.
Another solution would be to make tiny green balls/part that actually fall, and those would only fall on top of buildings, or around where the player is, or something like that. These balls would then analyze the part it touched and figure out what to do next, but if i have possibly hundreds of these falling at the same time, I guess that would cause a lot of lag too.
I'm not asking for a script, as I want to script it myself, I just want thoughts and ideas on how this would be done best. Thanks

6 comments
So, you're using a particle emitter?.
yes, and also my game is FE (just so you know)
Well, I would try raycasting, for the lag part, if you don't do it so often it'll be okay, as particles have no collisions.. invisible parts are possible too but not recommended
yeah the thing with ray casting is I need to make a ray for (pretty much) every part in the workspace, and if I have 100 parts, thats 100 rays, and I got to do this several times because some of the parts can shift around. (and that can total up to 1000 rays or more per 1 minute)
I recommend making a huge part in the sky, use math.random to get a random position in that part, send a ray downwards (direction), then testing if it hits something, and that multiple times,
The odds the the ray hitting something other than terrain are minimal. I was thinking something more systematic - it creates a ray above each part, ignoring any parts that it classifies as "Covered" and then yeah like that. So basically ur suggestion is to use raycasting, right?