hi folks,
ich have a box2d world (i am using libgdx by the way):
my character has a fixedRotation(true) as long as he is alive.
if he dies, he gets thrown around with fixedRotation(false).
Now i want to draw my animated skeleton with the "global" rotation/angle from the box2d body.
is that possible? and how?
bye
phil
in the old days (before using spine) i had it like this:
if (player.hasBeenHit == true) {
x = player.position_m.x - (player.width_m * 0.5f);
y = player.position_m.y - (player.height_m * 0.5f);
winkel = (MathUtils.radiansToDegrees * player.angle) + 90f;
batch.draw(keyFrame, x + character_goodGuy.SPRITEOFFSET_X, y + character_goodGuy.SPRITEOFFSET_Y, player.width_m * 0.5f, player.height_m * 0.5f, player.width_m, player.height_m, 1f, 1f, winkel, true); // TODO::: Dynamische daten verwenden
}
else {
batch.draw(keyFrame,
player.position_m.x - (player.width_m * 0.5f) + character_goodGuy.SPRITEOFFSET_X,
player.position_m.y - (player.height_m * 0.5f) + character_goodGuy.SPRITEOFFSET_Y,
player.width_m, player.height_m); // +2f);