Is it possible to adjust the opacity for Sprites?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Rmn337

Previously, I changed the visibile for the appearance of the Sprite. Now I want it to appear gradually

:bust_in_silhouette: Reply From: jgodfrey

You can adjust the alpha value of the sprite’s self_modulate property. So, something like this:

$Sprite.self_modulate.a = 0.5

The above will set the alpha value to 50%. To animate the change, you can drive that value via a Tween or an AnimationPlayer

Same issue here because animation player (self-modulate) jumps value to value and doesn’t seem to tween the opacity? BUT I think this answer is the key: How I animate sprite transparency independent from color?

That little .a that jgodfrey (true Godot guru, I might add) showed, is just the alpha channel! So if we only modulate that we might not get the jumpiness? And the linked ref said you can then animate the .rgb separately!

However, then it doesn’t show up at all. So then I saw the ->Edit → “create easing” which basically tweens it if you select 2 keyframes of self-modulate! I would guess that if you select the box “create Bézier curves” when you initially make the animation that this would do the same thing :slight_smile: