UPDATE 2017: This thread is too old and obsolote, new visitors be aware!!
Hello.
Have you seen the water drops on a car windshield of “DriveClub” video game for PS4? if no, please have a look at the GIF below:
(http://media.giphy.com/media/3ohzdGteRdT4Gvhzby/giphy.gif)
(C) GIF BY:Eric Chadwick
So here is what I’ve made so far:
(http://media.giphy.com/media/xUPGcvSuHjg9uV7Bzq/giphy.gif)
ATTENTION: This is only a first try of making metaballs, And is simulating one water drop (metaball) in a bigger scale, because of performance issues. Otherwise it is possible to spawn a lot of them in a smaller scales but frame rate would be 4-5 FPS.
but the problem is that when a car with that water drops goes a bit fast in my game, the water drops goes upward super fast, have a look at the GIF below:
(http://media.giphy.com/media/xUPGctsq8p9v3lZqdG/giphy.gif)
Simply it is a particle emitter that emits particles (the emitter is placed near the pointer in the last GIF image) and each particle has a collider, windshield has a collider,too. so when they collide they act as water, with a shader and a script those particles appear as water. As the car increases it’s speed, the particle goes upward which is correct but the water drops act as if the car has a supersonic speed.
Then to solve this problem, I increased frictions for both windshield and water drops, reduced and even increased wights of water drops and added force in (new vector3(0f,-100f,0f); ) to the water drops, still the problem is happening. Both windshield and the custom 2D Particles (with 3D colliders) have rigidbody.
For more information about how did I create this effect, visit this address:
http://www.polycount.com/forum/showthread.php?p=2337044#post2336924
(C)Copyrights and notes:
Shader: Rodrigo Fernández
rest of the things and the new shader me.
Images links are updated.
If you the GIFs don’t show up, try clicking on the hyperlinks.
Thanks to Obscura and MrChadwick for their helps.