How can i change the opacity of a sprite? What i want to do is when my character dies and revive, changes the opacity of the sprite intermittent to 0% to 100% to do like a invencible status.
The default sprite material and shaders has a constant “tint” that you can set to control coloring and/or opacity.
-- Set 50% alpha on sprite component "character" in the current game object.
sprite.set_constant("#character", "tint", vmath.vector4(1, 1, 1, 0.5))
M
thanks for the help
1 Like