Water Waves 2D is the effect for simulating 2D water surfaces with configurable properties, such as colors, sounds and properties of the waves.
Features
Modify how thick is your simulated sluid by seting the speed of oscilations, how fast they spread and how fast they decay.
Set frequency, size and force of random ripples to simulate rain or uncalm water surface.
Water can be a rectangle with a top surface or a circular surface.
Respects project’s Time Scale setting.
Supports sprite sorting layers.
How does it work?
It creates a 2D mesh with a trigger collider and buoyancy effector and keeps and array of points. On trigger enter and exit it applies forces to the points, calculates their new positions based on spring equations and updates vertex positions of the mesh.
What it cannot do?
Right now it doesn’t support texturing or any kind. It only uses the default sprite shader and doesn’t not have shaders to create any effects. It also does not generate any particles yet. These features can be added in the future, especially if they’ll be requested.
From the screenshot you emailed me I saw that you’re using Unity 2018 and this asset was only supposed to work in 2019 and higher (there was a note in description on the store page) but now I’ve updated it to support 2018 too (turned out to be pretty simple). This should fix it for you.
Thanks for choosing my asset and feel free to contact me if you’ll have any other feedback.
Not sure what exactly you want to acieve but this asset doesn’t do much more than shown in the video. If your intention is to simulate a wave, you can use the WaterWaves2D.Impact() method. It takes three arguments: position, the size of the object that is causing an impact and force of impact. The direction of the force decides if the impact causes water up or down.
This seems to work great, couple questions though.
Is there a built in option to add a texture to the water kinda like you have in this post ?
I want to add some texture to the water as it looks a bit boring in large areas.
Also im getting an error when untiking Enable audio.
im using unity 2019.4.18f1
“MissingReferenceException: The object of type ‘AudioSource’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.”
I’m sorry but this is something that I was working on by never finieshed. I hope to add an option for the texture in the future but I can’t promice that I’ll do it anytime soon. Too busy with my main job at the moment.
Acrescento os arquivos de áudio, água fazendo respingos, mas o som está muito alto, gostaria de abaixar, mas não consigo encontrar a opção para fazê-lo. Como posso controlar, diminuir ou aumentar o volume dos arquivos de som?