mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[csharp] Port of commit 508e501: Don't wrap angles for transform constraint absolute local.
This commit is contained in:
parent
8b5c66b8f8
commit
1e7350ac7d
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user