I am trying to create character animation using Sprite2D + AnimationTree and I am wondering is there a best way to create those animation from a huge animation sprite.
As I create more and more animation and goes down the list. I noticed that calculating or counting for the Frame number property is not efficient and I noticed the Frame Coords. But I haven’t seen any tutorial or guide leveraging this frame coords.
My question is: Is using Frame Coords a acceptable way to create animations since I feel it is easier to use coords to switch row and column instead of frames? Seems like Frame is just either mapped to x or y of Frame Coords depending on how the spritesheet is setup.
Is there another way that people love to use for their game when they have a lot of complex animation for their 2d sprite player?
Hi there, I’m not sure how efficient this is
I would recommend looking into using an animatedsprite2d node instead of just sprite 2d. This node is made specifically to help you not lose track large spritesheets such as this. You can use it to split up a large spritesheet into smaller animations that can be inserted into an animationplayer that can then be used in an animationtree.
I’m not anywhere near being a professional but the node setup i use as such:
Heres a short tutorial that shows the basics.
You can then insert the keys into the animationplayer by pressing animatedsprite2d node and then the animation button at at the bottom of the screen
then you can key the tracks into the animationplayer (this is just a quicker way instead of going through the add track button):
Thank you, during some searches I was under the impression AnimatedSprite2D was meant for easier usecases and in complex animation it seems the Sprite2D was recommended. Didn’t know I could use animationTree with the animatedSprite2D tbh. I will give it a try now. A follow up question is BlendTree will also work as expected with this setup right?
Just to confirm, this is what you mean by using the player + the animatedSprite2D correct? Is there a easier way to help spreading the keyframes with equal gaps so the animation plays smoothly? I am currently just arranging them by hand.
It should do it automatically when you key the frame and then press the tiny arrow for the next frame it should move to the next spot on its own as long as there is room for the frame (see video below)