• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Drawing on specific layer only

S

Strakee

Guest
Right now I have a blood drawing mechanic that draws on a simple area surface. It works like this: An object is created and as it flies it draws itself repeatedly on the surface like a brush.

The goal is to make it not draw itself on the background. (The blue part in the image is a background layer. The gray area is a sprite in an Asset layer.)


Is it possible to make it somehow draw itself only when it is on a specific layer (or a designated area) ? Without thousands of different surfaces for every sprite I want it to paint it on?
Sort of like photoshop layers.
If you are working on a smaller object on a background and overstrike, the "brush" won't paint outside the boundary.
Would be really nice if it didn't paint transparent pixels as well. Like a mask on which ONLY it can call the draw function.

I can solve this by making everything an object and checking it's collision mask.
But is there a cleaner way? Maybe some sort of shader-stuff ?

Thanks
 

Attachments

Top