I have a spritesheet (packed by the wonderful TexturePacker) that looks like so:
and the animation as an animation works well using the current code. However, when the animation moves to a frame where the bounding box is smaller (e.g. when the legs are closer, when the figure is kneeling, etc.), the image distorts so that the smaller bounding box fills the bounding box of the sprite.
How can I fix this?
The spritesheet above is a frame-extraction from a sample Adobe flash animation.
cant give you a link but here is what i do for these situations
AtlasSprite
for imagesthen in my
render
methodin my
update
method, which gives exact rectangular bounds of the current image displayed. Since you have stripped the whitespace and usedAtlasSprite
so bounds will be without blank whitespace.P.S. this is just a pseudo code and many syntatical error could be there its just to give you a idea