public void OnImported(VRMImporterContext context)
        {
            var gltfFirstPerson = context.GLTF.extensions.VRM.firstPerson;

            Horizontal.Apply(gltfFirstPerson.lookAtHorizontalOuter);
            VerticalDown.Apply(gltfFirstPerson.lookAtVerticalDown);
            VerticalUp.Apply(gltfFirstPerson.lookAtVerticalUp);
        }
Exemple #2
0
        public void OnImported(VRMImporterContext context)
        {
            var animator = GetComponent <Animator>();

            if (animator != null)
            {
                LeftEye  = OffsetOnTransform.Create(animator.GetBoneTransform(HumanBodyBones.LeftEye));
                RightEye = OffsetOnTransform.Create(animator.GetBoneTransform(HumanBodyBones.RightEye));
            }

            var gltfFirstPerson = context.VRM.firstPerson;

            HorizontalInner.Apply(gltfFirstPerson.lookAtHorizontalInner);
            HorizontalOuter.Apply(gltfFirstPerson.lookAtHorizontalOuter);
            VerticalDown.Apply(gltfFirstPerson.lookAtVerticalDown);
            VerticalUp.Apply(gltfFirstPerson.lookAtVerticalUp);
        }