Skip to content

Commit 271c88f

Browse files
committed
Handle negative scales
1 parent cc167e1 commit 271c88f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix
7575
{
7676
skeleton.scaleX *= -1;
7777

78-
src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);
78+
// -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled
79+
src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);
7980
}
8081
else
8182
{

0 commit comments

Comments
 (0)