- Home /
How to make a Particle System behave like a fluid?
Hi, how would I go about making particles stick to walls and other objects? I'm asking this because there's collision detection with the Shuriken particle system. So how would you represent something like fluids with this? Blood spatters, rain drops, paint etc. Should I just write a script and instantiate a spatter? Right now this seems like the only option, but I think it's kind of impractical since the result would vary from object to object.
Answer by VesuvianPrime · Aug 02, 2014 at 11:34 PM
Hey Kensei
While I haven't checked myself to see how it works, Shuriken definitely has an option for sending collision messages:
Presumably if you enable this you will be able to listen to the signal and instantiate your splats.
So, scripting it is then? No fluid support? I'm a bit sad, all my dreams of making lava fountains won't come true. I hope in Unity 5 with the new nvidia physics there will be something of the sort.
With the settings above, you can dampen the particle on collision so the particle appears to stick to stationary objects. You can also/ins$$anonymous$$d get the position of any hits, and create mesh quads with spats or other graphics at that position. So you can simulate a fluid marking a surface, but you cannot simulate the fluid itself (beyond your own script and managing the position of the particles in the particles array). Given hit positions, you could do other mesh creation or manipulation as well. So there are a range of things you can do, but you are not going to get in sort of "soft" physics unless you write it or buy it.
I see, thank you for the answer. I spent quite some time digging round to find about fluids in Unity, and it didn't seem like it had native support of this feature. I suppose the one plus is that I get to control exactly what happens via scripts.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
An OS design issue: File types associated with their appropriate programs 1 Answer
Set a range of startSpeed for Shuriken via script 2 Answers
Particle system stop? 3 Answers