Handle negative scales

This commit is contained in:
Richard Davey 2020-10-14 15:16:07 +01:00
parent cc167e158f
commit 271c88fab3

View file

@ -75,7 +75,8 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix
{
skeleton.scaleX *= -1;
src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);
// -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled
src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);
}
else
{