Re: Easy GL2D
Posted: Thu Sep 13, 2012 3:40 pm
yep, im using that technique to animate human characters
On other platforms Im used to drawing for example, the torso, then saving its matrix values e.g.(1,0,0,1,50,40)
Then when I am ready to draw a limb I load the torso's matrix (glLoadMatrix) and rotate and translate for each limb.
Maybe I could use Push and PopMatrix instead.(like your tentacle example)
glSpriteOnQuad seems to be the best command because an arm for example has to have its origin or 'handle' at the shoulder so it rotates from the shoulder.
glSpriteOnQuad could also be used to draw isometric tiles, the diamond shaped ones, from a square texture.
On other platforms Im used to drawing for example, the torso, then saving its matrix values e.g.(1,0,0,1,50,40)
Then when I am ready to draw a limb I load the torso's matrix (glLoadMatrix) and rotate and translate for each limb.
Maybe I could use Push and PopMatrix instead.(like your tentacle example)
glSpriteOnQuad seems to be the best command because an arm for example has to have its origin or 'handle' at the shoulder so it rotates from the shoulder.
glSpriteOnQuad could also be used to draw isometric tiles, the diamond shaped ones, from a square texture.