- Home /
how do i mask a sprite against a canvas?
basically, i'm working on a game to teach hand washing to kids where i have two hand shaped sprites with random bits of dirt that get generated on them that then need to be scrubbed off.
my problem is that sometimes the bits of dirt generate and peek out a little outside the bounds of the hands, and it looks sloppy. i want to somehow use masking (although this might not be the right approach) so that any of the bits of dirt that peek out over the boundary of the hand sprites get masked by the canvas, or otherwise don't appear.
any suggestions?
Answer by Maethorion · Jun 17, 2015 at 06:27 AM
Adding a mask component to the hand sprites and making the dirt bits child of the hands could be one way to do it.
Your answer
Follow this Question
Related Questions
Dynamic sprite mask 1 Answer
Crop/Mask a Sprite on runtime 0 Answers
How to crop or mask a sprite to a specific shape? 1 Answer
How would you mask a UI canvas like you would mask a sprite? 1 Answer
How to get masked sprite? 1 Answer