How to position a sprite in a 2D animation skeleton?

Posted by Paul Manta on Game Development See other posts from Game Development or by Paul Manta
Published on 2012-05-10T07:08:03Z Indexed on 2012/06/09 10:48 UTC
Read the original article Hit count: 371

Filed under:
|
|

Given two joints that define a bone, I would like to know how to decide where, between those two joints, I should draw the sprite. This should be a fairly simple thing to solve, but there is one thing that I am not sure about.

After I've determined the rotation of the sprite (which is the absolute angle the joints form with the x-axis), I also need to determine the origin point from where I need to start drawing the transformed image.

So how should I position the sprite between the two joints? Should I make the center of the image be the midpoint between the two joints, or should I make one the of the joints be the origin? Do these things matter that much (could the wrong positioning make the sprite move oddly during the animation)?

© Game Development or respective owner

Related posts about 2d

Related posts about animation