From e327ebc9bc41bbf3a7dc93075d1a3eff819c53dd Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 11 May 2022 14:49:22 +0900 Subject: [PATCH] ReverseX. #1532 --- Assets/VRM10/Runtime/IO/Vrm10Exporter.cs | 6 +----- Assets/VRM10/Runtime/IO/Vrm10Importer.cs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs index aace371d0..2b6d643c5 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs @@ -513,11 +513,7 @@ namespace UniVRM10 vrm.LookAt = new UniGLTF.Extensions.VRMC_vrm.LookAt { Type = lookAt.LookAtType, - OffsetFromHeadBone = new float[]{ - lookAt.OffsetFromHead.x , - lookAt.OffsetFromHead.y , - lookAt.OffsetFromHead.z , - }, + OffsetFromHeadBone = lookAt.OffsetFromHead.ReverseX().ToFloat3(), RangeMapHorizontalInner = ExportLookAtRangeMap(lookAt.HorizontalInner), RangeMapHorizontalOuter = ExportLookAtRangeMap(lookAt.HorizontalOuter), RangeMapVerticalDown = ExportLookAtRangeMap(lookAt.VerticalDown), diff --git a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs index 45eec0bbc..3f6265fa0 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs @@ -459,7 +459,7 @@ namespace UniVRM10 vrm.LookAt.LookAtType = src.Type; if (src.OffsetFromHeadBone != null) { - vrm.LookAt.OffsetFromHead = new Vector3(src.OffsetFromHeadBone[0], src.OffsetFromHeadBone[1], src.OffsetFromHeadBone[2]); + vrm.LookAt.OffsetFromHead = new Vector3(src.OffsetFromHeadBone[0], src.OffsetFromHeadBone[1], src.OffsetFromHeadBone[2]).ReverseX(); } if (src.RangeMapHorizontalInner != null) {