- Home /
How can I implement the ability to 'cut' sprites into arbitrary shapes?
I want to create a game where you have scissors that cut a sprite in a shape that you create by dragging your finger on the screen.
My problem is that I can't figure out how can I cut my sprite in the specific shape that the user creates with their finger.
So far the only solution that I found searching the web is that I'll need to create my own shader that lets me make a specific part of a texture transparent, but don't understand how I can apply that to my scenario?
Answer by Kiwasi · Dec 16, 2014 at 07:55 PM
I would suggest using a texture on a mesh, instead of a sprite. That way you can remove those parts of the mesh the user cuts. You could also cut it into two meshes.
Not rendering at all is cheaper then rendering transparent.
can you explain in a little more detail how can i do that? because i never used meshes in unity so im not familiar with the process... thank you in advance
It turns out that i dont need to cut a sprite, a simple one color texture or anything for example something like a quad in unity can work, just to overlay the image that i want to show when the user cuts the first image so to say, so i think that this is more simple, but still can you give me some pointers how can i do that, is it possible to slice a quad into arbitrary values??