2D Toolkit Forum
2D Toolkit => Support => Topic started by: DahongPunyal on January 23, 2014, 01:43:43 am
-
I am new to tk2d (also in Unity) and I want to know if it possible to create a game object for background (tk2dSprite attached), then create another game object on top of it (also attached with tk2dSprite). The second game object is for overlay and I want to add a clipping mask to it (a circle mask, so it will look like a hole). And then I will add another game object for my main sprite.
Also, I want the mask animate or change its size for a duration. Like, from small to big and vice versa. Is it possible to achieve this using tk2d or I need other library to do it?
Here's what I want to do:
(http://i40.tinypic.com/155l8ck.jpg)
Thanks!
-
It can be done but you will have to implement it yourself using shaders. If its just the background, making a custom shader is the quickest / easiest way to do this. You won't even need an atlas for that, which makes it even easier.
-
Thanks!
Can you give a link for a good tutorial of creating custom shader? I am new to Unity3D and it will be my first time to write one. :D
-
There are quite a few shader tutorials. I suggest reading up about them, you will open up a lot more options. Its pretty straightforward once you get the hang of it, and you'll only need a bit more than the basics for what you need.
http://unitygems.com/noobshader1/
-
Thanks! :D
Closed