- Home /
What's the best way to animate a transparent image descending over a circular image?
I have some circular UI widgets that represent portraits of characters. I am trying to animate jail bars descending from above to cover the portrait, making it look as though the character is now behind bars.
I'm not sure how best to achieve this effect in Unity. I would like to ensure that the portion of bars outside the bounds of the circular portrait do not render as the bars are descending into the portrait space.
Here's a general progression of the animation I am trying to create:
My first attempt was to position the bars already in-place over the portrait and reveal them via a linear-gradient alpha cutoff. However, this forces me to create two versions of the portrait: one without the bars and one with. I would much prefer to just tween an image of transparent bars down atop the portrait.
How can I best prevent the image of the bars from drawing outside the bounds of the portrait circle?
Your answer
Follow this Question
Related Questions
Treating an animated sprite as a mask? 1 Answer
Creating avatar and avatar masks for 'non-fbx' in the editor 1 Answer
Animator with mask problem 0 Answers
Shader: Masked Tint with Transparency 0 Answers