- Home /
Dynamically hide a section of a sprite using another sprite
Hello, Firstly we use 2dToolKit.
I am trying to figure out how to dynamically cut out a section of sprite using another sprite. Basically I want all of the wall object to be in front of the character except the cut out section that I want invisible. The difficult part is I want to be able to dynamically place the hole, else I would just throw another layer in front to hide the player sprite.
Foreground objects -> Wall Sprite -> Character Sprite -> Hole BG -> Background Objects
Any ideas are mush appreciated.
http://docs.unity3d.com/ScriptReference/Texture2D.SetPixel.html
You can set the alpha of the pixels you want to make the hole.
Your answer

Follow this Question
Related Questions
How do I define draw layers for particles? 1 Answer
Graphical issue in 2D mode. 1 Answer
Unity 5 Deferred Stencil Buffer Usage 1 Answer
Android texture Problem? 0 Answers
Can Unity render to a secondary screen in Android? 0 Answers