leonkrause / aseprite-import

Import Aseprite animations into Godot Engine
45 stars 7 forks source link

Why is the created node of type "Sprite" and not "AnimatedSprite"? #4

Open lstep opened 7 years ago

lstep commented 7 years ago

When importing a JSON formatted file from an Aseprite animation in Godot, I get the following node tree created:

That means the images I had are all in one sprite (horizontally aligned), in the Sprite node.

Is it what is supposed to happen? If yes, how do I get/access the individual sprites? When I do it by hand (saving a .PNG file for each sprite), I create an AnimatedSprite which gives me all the sprites in one place to choose.

leonkrause commented 7 years ago

Yes, that's how it's intended. Aseprite exports a sprite sheet (all frames in one texture file).

AnimatedSprite supports only animations with each frame in a separate file, so it can't be used.

Instead, a Sprite and an AnimationPlayer is used. Each animation from Aseprite is converted into a Godot Animation that is available in the AnimationPlayer. From within the Godot editor, one can now also add other tracks to the animation, e.g. function-call tracks or hitbox-transform tracks, which isn't possible with AnimatedSprite animations.