From 2d85419860945f740dcd05cf3ec24857a3dbbc03 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 15 Oct 2021 14:44:53 +0900 Subject: [PATCH] =?UTF-8?q?CreateNodes=20=E3=81=A7=E6=AD=A3=E3=81=97?= =?UTF-8?q?=E3=81=8F=20Scale=20=E3=82=92=E5=8F=8D=E6=98=A0=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM10/Runtime/IO/Vrm10Importer.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs index 2906b4e6c..d1de0411f 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs @@ -648,12 +648,16 @@ namespace UniVRM10 public static void CreateNodes(VrmLib.Node node, GameObject parent, Dictionary nodes) { GameObject go = new GameObject(node.Name); - go.transform.SetPositionAndRotation(node.Translation.ToUnityVector3(), node.Rotation.ToUnityQuaternion()); nodes.Add(node, go); + + // world + go.transform.SetPositionAndRotation(node.Translation.ToUnityVector3(), node.Rotation.ToUnityQuaternion()); if (parent != null) { - go.transform.SetParent(parent.transform); + go.transform.SetParent(parent.transform, true); } + // local + go.transform.localScale = node.LocalScaling.ToUnityVector3(); if (node.Children.Count > 0) {