mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 05:44:48 -05:00
VRMC_springBone_extended_collider fallback export
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user