Godot Version
4.3
Question
Hello again everyone,
So I have a 8x28 ish sprite sheet.
I’m using it for 8 directional animations
I have 6 different animations per direction. Currently I created an animated sprite 2d, and added all the animations for 1 direction.
Now would I keep adding the sprites for each direction in this 1 animated sprite 2d? And just have a large set in it? And name my stuff carefully so I can reference it? Or should I create multiple animated sprite 2ds? Or some other way?
Thanks for the help
Your method is fine but has the obvious disadvantage of having a lot of animations to deal with. My suggestion is to use sprite2d in combination with animationplayer and animationtree. you might have to put all the sprites in one file for this to work though
I just have one large jpeg for the sprites. I’m looking into animation player now, it does look like what I need. Thanks
I’ll update when I complete it
Its also worth looking into the animationtree, especially with 8-directional animations. It allows you to switch directions extremely easy. The bad thing is that animationtree can be complicated to understand
Do you know if I can access my sprite frames directly? Say I import a tileset of 8 hFrames and 28 vFrames. So a 8x28, could I use gdscript to access a 2d array of my frames?
Then create animations via functions? Cuz this manual placing for each frame, even with animation player is rough.
It’s a lot of manual labor - which I’m currently doing still.
Yes its possible. You have to load your texture in code and then convert it to an “Image” then you can select an area and convert it back to “ImageTexture”.
You dont need to put every frame in the animationplayer, you can just put the first and last frame and it will automatically go through all the frames in between