Change a specific animation's position in an AnimatedSprite

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

Hey guys,

I have a player, and I’m trying to add new animations to it.
When adding a new animation to my animatedSprite, the animation starts in a slightly differnet position than the other animations (a little to the left).

Trying to change its position changes all other animations as well.

How can I move a specific animation in an animated sprite?

Thanks in advance!

:bust_in_silhouette: Reply From: MintSoda

The sane solution, do it in GIMP/ Krita / Photoshop.

You shouldn’t do it in Godot. But if you want to do it anyway.

func process():
    if frame == 5:
        offset.x = 5
        offset.x = 0

which is a very bad design. I sincerely recommend you NOT do it.

Makes sense, thanks!
Just to make sure - we’re talking about an animation and not a specific frame.
Much appreciated!

putskan | 2020-12-17 07:47