Answer the question
In order to leave comments, you need to log in
How to make water physics like terraria in Unity 2D?
How can you create 2D water in Unity so that it is physical (it can spread, for example, like in the Terraria game), but at the same time, so that it interacts with the necessary colliders (fills places of different shapes, i.e. is not tied to a grid , unlike Terraria)?
I've seen ways to create water from Circle Objects, but that doesn't work for me.
Answer the question
In order to leave comments, you need to log in
count the volumes, in your case, the area, if the map is made of squares, it will be quite simple, the water always flows down, draw its path, and calculate what area should merge from the source, gradually fill the final area, to the area of the drained water. The area of the drained water is determined by the number of blocks of water (area), above the level of the new hole in the vessel.
This is the minimum so to speak. You can add the influence of the height of the water column (jet), gradual draining with a change in the line of the water surface, take into account the volume (area) of the drained water (between the vessels), etc...
But think about how much you need it, how it will affect the gameplay and iron load.
Free:
https://assetstore.unity.com/packages/tools/partic...
Paid:
https://assetstore.unity.com/packages/tools/partic...
This is from circle but with improvements. Without circle it will be much more difficult
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question