implement BlendShape LookAt

This commit is contained in:
ousttrue
2018-04-05 18:01:46 +09:00
parent 2bc3a48d6b
commit 87a7212a4c
6 changed files with 68 additions and 30 deletions

View File

@@ -208,6 +208,7 @@ namespace VRM
var blendShapeApplyer = exporter.Copy.GetComponent<VRMLookAtBlendShapeApplyer>();
if (boneApplyer != null)
{
gltf.extensions.VRM.firstPerson.lookAtType = LookAtType.Bone;
gltf.extensions.VRM.firstPerson.lookAtHorizontalInner.Apply(boneApplyer.HorizontalInner);
gltf.extensions.VRM.firstPerson.lookAtHorizontalOuter.Apply(boneApplyer.HorizontalOuter);
gltf.extensions.VRM.firstPerson.lookAtVerticalDown.Apply(boneApplyer.VerticalDown);
@@ -215,8 +216,10 @@ namespace VRM
}
else if (blendShapeApplyer != null)
{
// ToDo
throw new NotImplementedException();
gltf.extensions.VRM.firstPerson.lookAtType = LookAtType.BlendShape;
gltf.extensions.VRM.firstPerson.lookAtHorizontalOuter.Apply(blendShapeApplyer.Horizontal);
gltf.extensions.VRM.firstPerson.lookAtVerticalDown.Apply(blendShapeApplyer.VerticalDown);
gltf.extensions.VRM.firstPerson.lookAtVerticalUp.Apply(blendShapeApplyer.VerticalUp);
}
}
else if (lookAt != null)