Add support for rotating animations - move the origin to the animation frame center and add xAngle property to Direction enum

This commit is contained in:
2021-03-22 12:35:06 +01:00
parent 87678003f3
commit fd9eb07210
2 changed files with 8 additions and 6 deletions

View File

@@ -74,6 +74,6 @@ public class DefaultAnimationManager implements AnimationManager {
var texture = material.getTexture();
var spriteWidth = texture.getWidth() / columns;
var spriteHeight = texture.getHeight() / rows;
return meshManager.createQuad(spriteWidth, spriteHeight, spriteWidth / 2f, spriteHeight * 0.9f);
return meshManager.createQuad(spriteWidth, spriteHeight, spriteWidth / 2f, spriteHeight / 2f);
}
}