Hi, I loved your video tutorial. Step by step and very clear. I am new to godot and am trying to make a scratch off. I followed your example and it worked for me but I have a question: How do I know the percentage of the scratched surface? I would like that when 50% of the surface is scratched, the rest of the surface is automatically scratched. Thank you very much! ❤
Thanks, glad you liked it. Honestly I'm not completely sure. The most obvious way to me is to count how many pixels have been changed in the mask texture (the black and white texture on which we draw), but I'm afraid it's going to be quite slow because you have to do it in GDScript.
Hey! Awesome tutorial! Can this be aplied to a moving sprite? Like, if I have the sprite of a cow, could I erase the head and then move the cow with a missing head around?
Hi, I loved your video tutorial. Step by step and very clear. I am new to godot and am trying to make a scratch off. I followed your example and it worked for me but I have a question:
How do I know the percentage of the scratched surface? I would like that when 50% of the surface is scratched, the rest of the surface is automatically scratched.
Thank you very much! ❤
Thanks, glad you liked it.
Honestly I'm not completely sure. The most obvious way to me is to count how many pixels have been changed in the mask texture (the black and white texture on which we draw), but I'm afraid it's going to be quite slow because you have to do it in GDScript.
I think we can just use a transparent drawing color ?
Hey! Awesome tutorial! Can this be aplied to a moving sprite? Like, if I have the sprite of a cow, could I erase the head and then move the cow with a missing head around?
You have to make a shader on the texture and not a screen shader. So yes it can be done with some tweaking
@@mrelipteach That's cool! Would you say it's similar to what you do here and I could use this tutorial? Or do you think it's too different