[unity] Fix SkeletonUtility not following IK bone positions.

This commit is contained in:
pharan 2018-11-06 00:01:26 +08:00 committed by GitHub
parent 0fa7633ad1
commit e63a75e9e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,8 +143,9 @@ namespace Spine.Unity {
case UpdatePhase.World: case UpdatePhase.World:
case UpdatePhase.Complete: case UpdatePhase.Complete:
// Use Applied transform values (ax, ay, AppliedRotation, ascale) if world values were modified by constraints. // Use Applied transform values (ax, ay, AppliedRotation, ascale) if world values were modified by constraints.
if (!bone.appliedValid) { if (!bone.appliedValid)
bone.UpdateAppliedTransform(); bone.UpdateAppliedTransform();
if (position) if (position)
thisTransform.localPosition = new Vector3(bone.ax, bone.ay, 0); thisTransform.localPosition = new Vector3(bone.ax, bone.ay, 0);
@ -161,7 +162,6 @@ namespace Spine.Unity {
thisTransform.localScale = new Vector3(bone.ascaleX, bone.ascaleY, 1f); thisTransform.localScale = new Vector3(bone.ascaleX, bone.ascaleY, 1f);
incompatibleTransformMode = BoneTransformModeIncompatible(bone); incompatibleTransformMode = BoneTransformModeIncompatible(bone);
} }
}
break; break;
} }