Adjusting animation frame size for a larger Player character #213
-
Hello! I'd like to preface this with saying I have extensive programming experience, but not so much in Godot so this may be a dumb question. Any ideas? Hopefully this makes sense, I might not be using the right animation terminology. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What is the the size of the image that your using? For example if Your image is 768x864 you would have to divide the first number which is 768 by the number of horizontal frames which for this example its 16 which it will give you 48 and then you would do it again with the second number which is 864 but this time you would divide it by the number of vertical frames which is 18 and it will give you 48 so the horizontal and vertical frames would be 48x48 |
Beta Was this translation helpful? Give feedback.
-
You don't necessarily have to use a sprite sheet (which Sprite2D requires), what matters is the PlayerAnimation node. For my custom characters that are larger than standard, rather than having to deal with the utter tedium of having to put together an entire sprite sheet (and needing to expand it later if more sprites are required), I just have sprites be individual sprite images and use AnimatedSprite2D instead (though I keep the Sprite2D node around for reference but just hide it). You can either have all of your sprites be part of a single animation in the AnimatedSprite2D node and just have the singular frame property track, or you could create animations with only the sprites needed for the animation and set the AnimatedSprite2D animation value at the beginning of each animation so you just have the smaller selection of sprites you want. Considering you can only change the sprite frame number rather than select frames visually, I'd say the latter is easier to work with. It's a bit of a slight roundabout method of doing things, but I'd honestly say it makes things a lot easier when you don't have many sprites at the start, or have very large sprites. |
Beta Was this translation helpful? Give feedback.
You don't necessarily have to use a sprite sheet (which Sprite2D requires), what matters is the PlayerAnimation node.
For my custom characters that are larger than standard, rather than having to deal with the utter tedium of having to put together an entire sprite sheet (and needing to expand it later if more sprites are required), I just have sprites be individual sprite images and use AnimatedSprite2D instead (though I keep the Sprite2D node around for reference but just hide it). You can either have all of your sprites be part of a single animation in the AnimatedSprite2D node and just have the singular frame property track, or you could create animations with only the sprites needed …