Animate a texture rect?

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

I have a character card that displays their stats and uses a TextureRect node for their face.
I want it so when it takes damage, an animation plays, causing the image to change to a different one as well as do a side to side shake.

Because it is a texturerect bound by its parent’s(A vbox<panel<Controlnode) size and size flags, it will not move.

Is there a work around for this? Because using a sprite means it won’t obey its control nodes rules. which means I would have to hardcode its location.

:bust_in_silhouette: Reply From: entomology123

I solved it.
I made a sprite that is the new expression outside the confines of the panel
When the animation plays, the texture rect is invis and the sprite is visible. It comes, does the dance and is invis.
Struggled with this for 2 days. I make a post about it today and solve it.
Have a good day.