Преглед на файлове

[csharp] Port of commit 508e501: Don't wrap angles for transform constraint absolute local.

Harald Csaszar преди 1 година
родител
ревизия
1e7350ac7d
променени са 1 файла, в които са добавени 2 реда и са изтрити 10 реда
  1. 2 10
      spine-csharp/src/TransformConstraint.cs

+ 2 - 10
spine-csharp/src/TransformConstraint.cs

@@ -247,11 +247,7 @@ namespace Spine {
 				Bone bone = bones[i];
 
 				float rotation = bone.arotation;
-				if (mixRotate != 0) {
-					float r = target.arotation - rotation + data.offsetRotation;
-					r -= (float)Math.Ceiling(r / 360 - 0.5f) * 360;
-					rotation += r * mixRotate;
-				}
+				if (mixRotate != 0) rotation += (target.arotation - rotation + data.offsetRotation) * mixRotate;
 
 				float x = bone.ax, y = bone.ay;
 				x += (target.ax - x + data.offsetX) * mixX;
@@ -264,11 +260,7 @@ namespace Spine {
 					scaleY = (scaleY + (target.ascaleY - scaleY + data.offsetScaleY) * mixScaleY) / scaleY;
 
 				float shearY = bone.ashearY;
-				if (mixShearY != 0) {
-					float r = target.ashearY - shearY + data.offsetShearY;
-					r -= (float)Math.Ceiling(r / 360 - 0.5f) * 360;
-					shearY += r * mixShearY;
-				}
+				if (mixShearY != 0) shearY += (target.ashearY - shearY + data.offsetShearY) * mixShearY;
 
 				bone.UpdateWorldTransform(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);
 			}