mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-07 19:26:54 +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) {
|
if (followBoneRotation) {
|
||||||
Vector3 worldRotation = skeletonTransform.rotation.eulerAngles;
|
Vector3 worldRotation = skeletonTransform.rotation.eulerAngles;
|
||||||
|
if (followLocalScale && bone.scaleX < 0) boneWorldRotation += 180f;
|
||||||
#if UNITY_5_6_OR_NEWER
|
#if UNITY_5_6_OR_NEWER
|
||||||
thisTransform.SetPositionAndRotation(targetWorldPosition, Quaternion.Euler(worldRotation.x, worldRotation.y, skeletonTransform.rotation.eulerAngles.z + boneWorldRotation));
|
thisTransform.SetPositionAndRotation(targetWorldPosition, Quaternion.Euler(worldRotation.x, worldRotation.y, skeletonTransform.rotation.eulerAngles.z + boneWorldRotation));
|
||||||
#else
|
#else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user