mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-24 11:40:45 -05:00
CreateNodes で正しく Scale を反映する
This commit is contained in:
parent
cee27ed12b
commit
2d85419860
|
|
@ -648,12 +648,16 @@ namespace UniVRM10
|
|||
public static void CreateNodes(VrmLib.Node node, GameObject parent, Dictionary<VrmLib.Node, GameObject> 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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user