0
\$\begingroup\$

I am working on a project where I want to model a simple flow of fluids around a circuit of pipe. I thought a simple way to do this would be to create an irregular shaped loading bar, then animating the shape as it filled up.

I have found answers for how to create regular loading bars that are rectangle shaped, as well as some for circular loading bars.

But what if want some arbitrary "circuit" of pipes, kind of like one long windey loading bar.

\$\endgroup\$
1
  • \$\begingroup\$ Presumably then you've tried using a LineRenderer for this purpose? This lets you draw an arbitrary-bent/curved ribbon of geometry, with texture coordinates running the length of it that you can use for animating your fill. \$\endgroup\$
    – DMGregory
    Feb 27 '20 at 23:08
0
\$\begingroup\$

Maybe overkill, but I would use a fluid simulation. They usually simulate small particles that behave like molecules in a fluid (using all the fancy adhesion and cohesion physics stuff).

Here is a free one on the Asset Store: https://assetstore.unity.com/packages/tools/particles-effects/water-2d-136297

Be wary though, this will cost you a little bit on the performance-side.

\$\endgroup\$
1
  • \$\begingroup\$ About the performance, would there be a way to "bake" it as an animation? \$\endgroup\$
    – Vaillancourt
    Mar 6 '20 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.