VRMC_springBone_extended_collider fallback export

This commit is contained in:
ousttrue
2024-06-17 16:26:40 +09:00
parent 8b09ff9af1
commit 412e3c5dc2

View File

@@ -321,6 +321,17 @@ namespace UniVRM10
break;
}
case VRM10SpringBoneColliderTypes.Plane:
{
const float DISTANCE = 1000.0f;
shape.Sphere = new UniGLTF.Extensions.VRMC_springBone.ColliderShapeSphere
{
Radius = 1000.0f,
Offset = ReverseX(z.Offset - z.TailOrNormal.normalized * DISTANCE),
};
break;
}
default:
{
// 既存実装で未知の collider が来た時に throw しているので
@@ -328,7 +339,7 @@ namespace UniVRM10
shape.Sphere = new UniGLTF.Extensions.VRMC_springBone.ColliderShapeSphere
{
Radius = 0,
Offset = new float[] { 0, 0, 0 },
Offset = new float[] { 0, -10000, 0 },
};
break;
}