- Home /
How to color-fill an area that is confined with colliders?
Hi.
Is there a way to "fill" a certain space in the world with a color? The colored space would be confined with colliders (or some other invisible dummy objects, doesn't have to be colliders necessarily). The area that is within the colliders would then be colored with a defined color, no matter from which angle the camera is looking, so it would be great if would also work in 3D.
Hopefully this illustration shows what I mean (the illustration is in 2D but I hope you get what I mean).
What I am trying to do is "simulate liquid" in a closed space that has arbitrary shape. The colliders would define the walls of a "water tank" and the topmost collider would simulate the water surface increasing and decreasing in the tank (and also would stay leveled when the tank rotates).
Here is another illustration (2 water tanks) about what I'm trying to achieve (again in 2D, but I am aiming for 3D solution).
I tried Fluvio 2, but particle based approach is really not optimal as I don't want my water to look like a bunch funky bouncy balls. Also I need to be able to precisely control where the water surface is, that would be difficult with increasing/decreasing amount of water particles. Also I do not need any buoyancy or viscosity features.
Other ideas about how to achieve the above are welcome too!