I have made this simple OOP module that makes rain with raycasts and updates in real time, its decently optimized.
Methods:
local RainCast
local rain = RainCast.new()
rain:init()
rain:stop()
rain.Range:Number -- Sets how far the rain extends out around the camera.
rain.DropsPerFrame:Number -- How much droplets spawn per frame
rain.Height:Number -- From how high the rain raycasts down
rain.FrameTime:Number -- How long a frame is
rain.LifeTime:Number -- How long a droplet stays
rain.RainTemplate:Part | Model -- Droplet model/part that gets duplicated around
rain.ActiveDrops -- Returns a table of every active drop.
rain.SoundSettings = {
["Inside_Sound"]:Sound, -- The sound that gets played when the camera is inside
["Outside_Sound"]:Sound; -- The sound that gets played when the camera is outside
["FadeTime"] = 1, -- The fade time between the inside and outside sound
}
-- If you don't set these values then the module will resort to the default values.
Example
local RainCast = require(game.ReplicatedStorage.RainCast)
local rain = RainCast.new()
rain:init()
random puddle size variation , of total splash size might be good.. like big drops, med, small..
I color range might add some pop… and or different random set shades… like white, cyan.. blue etc… and or a range where it hits and is white, then goes to blue…
is this client side only?
different puddle textures or flipbooks, random might be cool…
add sound under the players camera.. could just be a loop , not per drop…
random heavy rain to med to light, rain patterns…
Why does it hit the ground at the rotating part?
It’s because the rain particle stays there for a second even if something is above it, fixable by perhaps lowering the Lifetime Value.
The particle effect is customisable and this effect is just a default I made. You can edit it yourself since I’m not that good with VFX.
Same answer
Yes
Same answer as 1 and 2.
Next update!
Could consider that, yeah.
I’ll make it ignore the player too, that looks ridiculous
Added a max per frame so it doesn’t use more then cached
Made rain not hit player
New Methods:
rain.ActiveDrops -- Returns a table of every active drop.
rain.SoundSettings = {
["Inside_Sound"]:Sound, -- The sound that gets played when the camera is inside
["Outside_Sound"]:Sound; -- The sound that gets played when the camera is outside
["FadeTime"] = 1, -- The fade time between the inside and outside sound
}
kinda a tricky sound tuning… because if you are in the room., but the camera is outside for sure , like below, you hear the rain hard.. which i guess is good.. but you are in the room… … or is the sound distance based from the camera like 10 studs away or something..? if so then on the top down inside the room , camera.. why do I hear loud rain… if the camera is inside the room, just below the roof? or that might be a sound
The bug that you hear the rain loud if you put the camera on the ceiling is because the algorithm to check if your inside is just a raycast going up from your camera (thats why if your character is inside but your camera isnt it sounds loud). This bug happens since the raycast is going trough the ceiling. This can be easily fixed but it isnt actually such a major bug.