1 year ago

#354078

test-img

JodiMcJodson

How do I automatically determine the size of each sprite in a spritesheet

I have multiple sprite sheets but each one has slightly smaller/larger sprites (oops) But they all luckily have a very well defined border (though it is a different size for each sheet)

I want to be able to detect how large each sprite sheet's sprites are in order to properly turn them into separate image handles

I tried just hard coding the separate sizes but it was too clunky and not scalable. I also saw this post: Sprite Sheet Detect Individual Sprite Bounds Automatically, but the answers are for splitting a sprite sheet into individual images, so I'm not sure if it applies

Image of one of the sprite sheets

rust

bevy

0 Answers

Your Answer

Accepted video resources