Animate a character using a spritesheet where the frames have different sizes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mofro
:warning: Old Version Published before Godot 3 was released.

So I have a spritesheet, and I can currently choose each individual frame for my sprite using the texture autoslice facility.

But I now want to use the same spritesheet for the character animation, but vframe and hframe doesn’t work becuase the frames arent all the same size. Is there anyway of cycling through the autoslice rects to animate the character?

:bust_in_silhouette: Reply From: wombatTurkey

AnimatedSprite node is your best bet I think :slight_smile:

Can you explain a bit further?
The only way I can think of doing this is by separating the spritesheet into indivdual sprites and then using those with AnimatedSprite

mofro | 2017-07-09 10:57

You can simply use animatedSprite:
just add it by clicking + icon and searching for it.
then Click on it to see its properties in the Inspector and there you’ll find Frames double click there.
then simply drag all sprites… then you can play it from inspector or by code where you need to play animation.

I hope it helps!

Let me know if you need more help regarding this.

Heymi | 2018-01-12 22:11

:bust_in_silhouette: Reply From: Heymi

You can use AnimatedSprite, watch this: