Hi,
I've been playing around with the biped, (thanks to whoever created that! very realistic). Anyway, I was trying map sprites to the biped body members, but the sprite-to-body mapping is a bit 'off'. My approach was to loop over each biped member (head, chest, stomach...) and set my sprite's position and angle to match the corresponding biped body member. Something like so,
headSprite.position = headBody->GetPosition();
headSprite.angle = headBody->GetAngle();
However the sprites do not match up to the actual body positions in rendering. The head sprite is dead on accurate, but the other sprites are offset down and to the left very noticeably (wrt the debugdrawing of biped). When I plot out the BipedDef::DefaultPositions() on graphing paper the point plot looks a little unexpected for me, kinda like a banana or very slight crescent. But my graph paper plot is consistent with where my sprites appear to end up in rendering, so I'm not sure what is going on.
I'd like to figure out the correct positioning for the actor sprites, without doing any manual sprite offsetting, incase I need to change the actor size, and then have to recalibrate/offset the sprites again.
Any help or tips are greatly appreciated.
I've been playing around with the biped, (thanks to whoever created that! very realistic). Anyway, I was trying map sprites to the biped body members, but the sprite-to-body mapping is a bit 'off'. My approach was to loop over each biped member (head, chest, stomach...) and set my sprite's position and angle to match the corresponding biped body member. Something like so,
headSprite.position = headBody->GetPosition();
headSprite.angle = headBody->GetAngle();
However the sprites do not match up to the actual body positions in rendering. The head sprite is dead on accurate, but the other sprites are offset down and to the left very noticeably (wrt the debugdrawing of biped). When I plot out the BipedDef::DefaultPositions() on graphing paper the point plot looks a little unexpected for me, kinda like a banana or very slight crescent. But my graph paper plot is consistent with where my sprites appear to end up in rendering, so I'm not sure what is going on.
I'd like to figure out the correct positioning for the actor sprites, without doing any manual sprite offsetting, incase I need to change the actor size, and then have to recalibrate/offset the sprites again.
Any help or tips are greatly appreciated.