as you can see i want my character to face the direction hes moving:
but what would be the best method for ajusting the rotation to say 45 degrees when my character moves up and left at the same time?Code:if (Key.isDown(Key.UP)) {
h._rotation = 90;
h._y -= speed;
}
if (Key.isDown(Key.DOWN)) {
h._rotation = 270;
h._y += speed;
}
if (Key.isDown(Key.LEFT)) {
h._rotation = 0;
h._x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
h._rotation = 180;
h._x += speed;
}
