Updated SkeletonUtilityBone to handle FlipX better by scaling Z in follow mode when world flipped.

This commit is contained in:
Fenrisul 2015-02-07 01:48:05 -08:00
parent 12110a72ca
commit 366cbaf0c3

View File

@ -172,7 +172,7 @@ public class SkeletonUtilityBone : MonoBehaviour {
}
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);
}
@ -206,6 +206,7 @@ public class SkeletonUtilityBone : MonoBehaviour {
}
bone.Rotation = angle;
bone.RotationIK = angle;
}
if (scale) {
@ -245,6 +246,7 @@ public class SkeletonUtilityBone : MonoBehaviour {
}
bone.Rotation = angle;
bone.RotationIK = angle;
}
//TODO: Something about this