diff --git a/Editor/ColliderManagerEditor.cs b/Editor/ColliderManagerEditor.cs index 525bb26..dd1a488 100644 --- a/Editor/ColliderManagerEditor.cs +++ b/Editor/ColliderManagerEditor.cs @@ -321,12 +321,38 @@ private void UpdateSymmetrical(SymmetricalUpdateType type) else if (boneName.Contains("_Hip")) { symName = boneName; - } - else if (name == "CC_Base_NeckTwist01_Capsule(1)") + } + + if (!string.IsNullOrEmpty(symName)) + { + foreach (ColliderSettings cs in colliderManager.settings) + { + if (cs != currentCollider && cs.name.StartsWith(symName)) + { + if (type == SymmetricalUpdateType.Update) + { + cs.MirrorX(currentCollider); + cs.Update(); + } + else if (type == SymmetricalUpdateType.Reset) + { + cs.Reset(); + } + else if (type == SymmetricalUpdateType.Fetch) + { + cs.FetchSettings(); + } + } + } + } + + symName = null; + + if (name == "CC_Base_NeckTwist01_Capsule(1)") { symName = "CC_Base_NeckTwist01_Capsule(2)"; } - else if (name == "CC_Base_NeckTwist01_Capsule(2)") + else if (name == "CC_Base_NeckTwist01_Capsule(2)") { symName = "CC_Base_NeckTwist01_Capsule(1)"; } @@ -339,7 +365,7 @@ private void UpdateSymmetrical(SymmetricalUpdateType type) { if (type == SymmetricalUpdateType.Update) { - cs.MirrorX(currentCollider); + cs.MirrorZ(currentCollider); cs.Update(); } else if (type == SymmetricalUpdateType.Reset) diff --git a/Runtime/ColliderManager.cs b/Runtime/ColliderManager.cs index d7c885d..afa4562 100644 --- a/Runtime/ColliderManager.cs +++ b/Runtime/ColliderManager.cs @@ -123,11 +123,11 @@ public void MirrorZ(ColliderSettings cs) { radiusAdjust = cs.radiusAdjust; heightAdjust = cs.heightAdjust; - xAdjust = cs.xAdjust; + xAdjust = -cs.xAdjust; yAdjust = cs.yAdjust; - zAdjust = -cs.zAdjust; + zAdjust = cs.zAdjust; xRotate = -cs.xRotate; - yRotate = cs.yRotate; + yRotate = -cs.yRotate; zRotate = cs.zRotate; }