• Unity
  • sprite masks

Related Discussions
...

I am implementing blood splatter effect in Unity.
Is there any way to display red square on hair only? It should works like masks in unity. Red square should follow animation.
I found some examples with skeleton masks but it doesn't help in my case.

kwozniak992 a écrit

It should works like masks in unity.

If you really want your skeleton to mask any blood-stain images, you would need to e.g. render the skeleton to the stencil buffer. Then you would render the blood effect where it passes the stencil test. This requires custom shaders to work however.

The easiest solution by far should be to simply create duplicates of your attachments, stained with blood. Then swap your clean attachments with your blood-stained versions when needed.