mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Updated SkeletonUtilityBone to handle FlipX better by scaling Z in follow mode when world flipped.
This commit is contained in:
parent
12110a72ca
commit
366cbaf0c3
@ -172,7 +172,7 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (scale) {
|
if (scale) {
|
||||||
cachedTransform.localScale = new Vector3(bone.scaleX, bone.scaleY, 1);
|
cachedTransform.localScale = new Vector3(bone.scaleX, bone.scaleY, bone.worldFlipX ? -1 : 1);
|
||||||
|
|
||||||
nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
nonUniformScaleWarning = (bone.scaleX != bone.scaleY);
|
||||||
}
|
}
|
||||||
@ -206,6 +206,7 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bone.Rotation = angle;
|
bone.Rotation = angle;
|
||||||
|
bone.RotationIK = angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scale) {
|
if (scale) {
|
||||||
@ -245,6 +246,7 @@ public class SkeletonUtilityBone : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bone.Rotation = angle;
|
bone.Rotation = angle;
|
||||||
|
bone.RotationIK = angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Something about this
|
//TODO: Something about this
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user