How I animate sprite transparency independent from color?

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

With Godot 2 there was an opacity option for sprites which was editable with the Animation Player. Now with Godot 3 I can add the full color RGBA (via “modulate” parameter) to the Animation Player timeline only. I see no Option to modify the Alpha without setting the RGB or modulate the RGB without setting the Alpha.

Or there a hidden timeline options like
:modulate_A
:modulate_RGB
:modulate_R
:modulate_G
:modulate_B

:bust_in_silhouette: Reply From: Lola

Hello,

When keying the modulate property, this property path is used by the animation player: Sprite2D:modulate.
You can change it manually to Sprite2D:modulate:a to only key the a component of modulate (click on the name of the animation track to edit it).

Also, for exported values that have several components using bezier curves automatically creates one track per property.

However if you want to animate the color and the alpha of the same property in two different tracks you have to hack it by adding a Sprite2D:modulate track where you animate RGB and a Sprite2D:modulate:a below which overrides the alpha of the first track.

Thank you!!!

Lebostein | 2021-10-19 10:08

I wonder why I do not see these special options in the method selecting window if I add a new track related to a sprite…

Lebostein | 2021-10-20 04:54