Closed zhagsenkk closed 5 years ago
This is a pretty easy effect to accomplish: SpriteMask.zip
This is already possible and quite easy to do with shaders. I suggest to have a look to gdquests video about transition shaders : https://youtu.be/K9FBpJ2Ypb4
If you need any help please ask on the other community channels.
This is a pretty easy effect to accomplish: SpriteMask.zip
Thanks for the help. But if there is a group of sprites to be cut off, how to do it? @BastiaanOlij @groud
"a group of sprites" means that a sprite with several children.
Simply apply the same material to all child nodes, and compute the masking according to the screen position. But once again, ask in the other community channels, this is not the place to ask for support.
What @groud said, just reuse the material. :)
This does not work when using different sprites with a multitude of materials @groud
Issue description: Sprite masks is usually used in 2d game. Godot doesn't have a easy and flexible way to make it.And cocos game engine and unity both have an implementation of SpriteMasks or ClippingNode. Similar with some other engine.
unity: https://docs.unity3d.com/2018.3/Documentation/Manual/class-SpriteMask.html cocos: http://docs.cocos2d-x.org/api-ref/cplusplus/V3.17/d2/d06/classcocos2d_1_1_clipping_node.html
Defold: https://www.defold.com/examples/gui/stencil/
Phaser: http://phaser.io/examples/v2/sprites/mask#gv