I'm coding up a simple golden-axe type game and one of the issues that I have come across are that my animation clips use sprites that are not guaranteed to be the same dimensions.
For ex: my idle animation may consist of 4 PNG files that have the same dimensions (lets say 128x128) but my attack animation goes to 280x180 due to a sword being swung around.
The issue is that when I trigger attack animation, it loads my animation just fine but because the sprite sizes differ, my visible x,y of the character changes. In my case, he drops down and to the left noticeably when attacking, then resumes his animation. This looks a bit jerky.
I'm assuming that somewhere I can pad this to offset for the difference, so when i run attack animation, I could realign the sprite to play the animation so that the apparent position of the character doesn't change.
The other alternative is to make all sprites the same size (the biggest) but that seems very wasteful (so idle, walk, and attack would all be 280x180)
Any suggestions?