Makes particles don't go through parts

Im not going to make 1K+ invisible parts just for this.

2 Likes

Particle collision isn’t possible using ParticleEmitters. You’d have to make a custom particle system that uses raycasting or some other collision detection.

However, if you have a special circumstance, say, rain is hitting the top of a flat roof, you can calculate the desired lifetime such that the particles are removed as they hit the roof.

5 Likes

Can’t believe that, roblox has been upgraded and developed that much, and they still didn’t add a way to destroy particles after part hit.

5 Likes

What about checking if the user has a roof ontop of his head?

Even if you did that, you’d still be able to see the particles going through the roof if you’re not already under it.

Not to mention if you ARE under it, looking outside wouldn’t have the effects show.

It’d look very strange.

That’s better than the rain breaking through.

2 Likes

I believe tomarty’s rain module does something like that, so you can look into its source code. That’s actually a problem I’ve pondered recently while watching Minecraft rain; rain shows around a roof of any shape but not under it. It’s a lot simpler in a voxel word, I’d imagine. Doing it in Roblox is a challenge I don’t know where to even start.

EDIT: I meant buildthomas but thankfully tomarty has one too :stuck_out_tongue:

Can you please link me it? ------

Mine isn’t public :stuck_out_tongue: The rain in my game Shard Seekers is a bit lacking tbh; I need to make the rain fall in sheets using particle emitters, but I’m usually too busy working on other updates.

@phSalami you could try making a feature request for this, but a thread for it may already exist.

It may be possible to implement custom particles with raycasting, but an engine-level feature is generally more performant than doing it ourselves. It may even be possible for the engine to approximate collisions for emitters with high emission rates, or on low-end devices.

Use-cases include rain, snow, sparks, fire, and much more. It would be useful to be able to specify the elasticity of particles, as well as if they should just disappear. Rain would benefit from a more-complex API that allows the developer to define a “splash” particle animation that appears after a collision.

This is all doable with current API’s, but running splash particles on a large scale is difficult to make performant (I’ve tried):

https://devforum.roblox.com/t/what-are-you-working-on-currently-2016/19325/4467?u=tomarty

2 Likes

You can make an invisible part above the camera(game.workspace.CurrentCamera).
By using Camera’s Position, you may be able to use Raycasting to check if there is a visible part above camera.

Note:Use localscript.

If there is a visible part above, tell the script that it should enable the particle emitter.

I know this thread is kind of dead but I saw it this morning and it made me curious. I wanted to try out an idea I had that could do this without the need of raycasting or region3s. It turned out alright and it’s pretty performant.

I made some further optimizations. Now it only rains where it needs to.

The jittering in the profile is due to the recording software… no GPU on this laptop.

11 Likes

I have an idea: make a part that casts particles and place it, let’s say, 50 studs above the ground. Make the particles’ lifetime so they will disappear when they reach the ground. Now, when you need to make a rain above a building, copy the part and place it on the roof of that building and position that part 50 studs above the roof.

1 Like

Not to be rude, but Its not a baseplate game, it has buildings, towers and hills.

Nice work bud, how did you do this?

It would be nice to know how this is done.

I know this thread is really old but I was wondering if you could explain what you used to do this. I’ve been trying to figure out different ways to create rain and snow across vast areas but I haven’t been very sucessful.

2 Likes

I know this topic is being old for 3 months, but I’ve asked the same question today and I have found no solution, can someone atleast help us improve the gameplay experience by telling us how to do this? Or maybe give us some tips to start doing it?

1 Like