mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
[unity] BoneFollower. Negate rotation from negative scaleX.
This commit is contained in:
parent
92cacd7e6d
commit
c2dea9f9fd
@ -163,6 +163,7 @@ namespace Spine.Unity {
|
||||
|
||||
if (followBoneRotation) {
|
||||
Vector3 worldRotation = skeletonTransform.rotation.eulerAngles;
|
||||
if (followLocalScale && bone.scaleX < 0) boneWorldRotation += 180f;
|
||||
#if UNITY_5_6_OR_NEWER
|
||||
thisTransform.SetPositionAndRotation(targetWorldPosition, Quaternion.Euler(worldRotation.x, worldRotation.y, skeletonTransform.rotation.eulerAngles.z + boneWorldRotation));
|
||||
#else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user