From f5a1c1e537e4c02c77c1a3b8676afbfa84f8ffd6 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 30 Apr 2021 13:21:36 +0900 Subject: [PATCH] remove unused Format/NodeCollider --- Assets/VRM10/Runtime/Format/NodeCollider.meta | 8 - .../Format/NodeCollider/Deserializer.g.cs | 172 ------------------ .../NodeCollider/Deserializer.g.cs.meta | 11 -- .../Runtime/Format/NodeCollider/Format.g.cs | 57 ------ .../Format/NodeCollider/Format.g.cs.meta | 11 -- .../Format/NodeCollider/Serializer.g.cs | 160 ---------------- .../Format/NodeCollider/Serializer.g.cs.meta | 11 -- Assets/VRM10/Runtime/IO/Vrm10Exporter.cs | 24 +-- Assets/VRM10/Runtime/IO/Vrm10Importer.cs | 90 ++++----- .../Migration/MigrationVrmSpringBone.cs | 39 ++-- Assets/VRM10/Tests/MigrationTests.cs | 7 +- 11 files changed, 77 insertions(+), 513 deletions(-) delete mode 100644 Assets/VRM10/Runtime/Format/NodeCollider.meta delete mode 100644 Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs delete mode 100644 Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs.meta delete mode 100644 Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs delete mode 100644 Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs.meta delete mode 100644 Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs delete mode 100644 Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs.meta diff --git a/Assets/VRM10/Runtime/Format/NodeCollider.meta b/Assets/VRM10/Runtime/Format/NodeCollider.meta deleted file mode 100644 index c5aa25fd7..000000000 --- a/Assets/VRM10/Runtime/Format/NodeCollider.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 57de298702679f949a2f2658ad186d4a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs b/Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs deleted file mode 100644 index b97f75bb1..000000000 --- a/Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs +++ /dev/null @@ -1,172 +0,0 @@ -// This file is generated from JsonSchema. Don't modify this source code. -using UniJSON; -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UniGLTF.Extensions.VRMC_node_collider { - -public static class GltfDeserializer -{ - -public static bool TryGet(UniGLTF.glTFExtension src, out VRMC_node_collider extension) -{ - if(src is UniGLTF.glTFExtensionImport extensions) - { - foreach(var kv in extensions.ObjectItems()) - { - if(kv.Key.GetUtf8String() == VRMC_node_collider.ExtensionNameUtf8) - { - extension = Deserialize(kv.Value); - return true; - } - } - } - - extension = default; - return false; -} - - -public static VRMC_node_collider Deserialize(JsonNode parsed) -{ - var value = new VRMC_node_collider(); - - foreach(var kv in parsed.ObjectItems()) - { - var key = kv.Key.GetString(); - - if(key=="extensions"){ - value.Extensions = new glTFExtensionImport(kv.Value); - continue; - } - - if(key=="extras"){ - value.Extras = new glTFExtensionImport(kv.Value); - continue; - } - - if(key=="shapes"){ - value.Shapes = Deserialize_Shapes(kv.Value); - continue; - } - - } - return value; -} - -public static List Deserialize_Shapes(JsonNode parsed) -{ - var value = new List(); - foreach(var x in parsed.ArrayItems()) - { - value.Add(Deserialize_Shapes_ITEM(x)); - } - return value; -} - -public static ColliderShape Deserialize_Shapes_ITEM(JsonNode parsed) -{ - var value = new ColliderShape(); - - foreach(var kv in parsed.ObjectItems()) - { - var key = kv.Key.GetString(); - - if(key=="extensions"){ - value.Extensions = new glTFExtensionImport(kv.Value); - continue; - } - - if(key=="extras"){ - value.Extras = new glTFExtensionImport(kv.Value); - continue; - } - - if(key=="sphere"){ - value.Sphere = Deserialize_Sphere(kv.Value); - continue; - } - - if(key=="capsule"){ - value.Capsule = Deserialize_Capsule(kv.Value); - continue; - } - - } - return value; -} - -public static ColliderShapeSphere Deserialize_Sphere(JsonNode parsed) -{ - var value = new ColliderShapeSphere(); - - foreach(var kv in parsed.ObjectItems()) - { - var key = kv.Key.GetString(); - - if(key=="offset"){ - value.Offset = Deserialize_Offset(kv.Value); - continue; - } - - if(key=="radius"){ - value.Radius = kv.Value.GetSingle(); - continue; - } - - } - return value; -} - -public static float[] Deserialize_Offset(JsonNode parsed) -{ - var value = new float[parsed.GetArrayCount()]; - int i=0; - foreach(var x in parsed.ArrayItems()) - { - value[i++] = x.GetSingle(); - } - return value; -} - -public static ColliderShapeCapsule Deserialize_Capsule(JsonNode parsed) -{ - var value = new ColliderShapeCapsule(); - - foreach(var kv in parsed.ObjectItems()) - { - var key = kv.Key.GetString(); - - if(key=="offset"){ - value.Offset = Deserialize_Offset(kv.Value); - continue; - } - - if(key=="radius"){ - value.Radius = kv.Value.GetSingle(); - continue; - } - - if(key=="tail"){ - value.Tail = Deserialize_Tail(kv.Value); - continue; - } - - } - return value; -} - -public static float[] Deserialize_Tail(JsonNode parsed) -{ - var value = new float[parsed.GetArrayCount()]; - int i=0; - foreach(var x in parsed.ArrayItems()) - { - value[i++] = x.GetSingle(); - } - return value; -} - -} // GltfDeserializer -} // UniGLTF diff --git a/Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs.meta b/Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs.meta deleted file mode 100644 index 8d5235f1b..000000000 --- a/Assets/VRM10/Runtime/Format/NodeCollider/Deserializer.g.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 162032f06e7a71549bb767d4aad3d221 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs b/Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs deleted file mode 100644 index 1f33f6cd6..000000000 --- a/Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs +++ /dev/null @@ -1,57 +0,0 @@ -// This file is generated from JsonSchema. Don't modify this source code. -using System; -using System.Collections.Generic; -using UniGLTF; -using UniJSON; - -namespace UniGLTF.Extensions.VRMC_node_collider -{ - - public class ColliderShapeSphere - { - // The sphere center. vector3 - public float[] Offset; - - // The sphere radius - public float? Radius; - } - - public class ColliderShapeCapsule - { - // The capsule head. vector3 - public float[] Offset; - - // The capsule radius - public float? Radius; - - // The capsule tail. vector3 - public float[] Tail; - } - - public class ColliderShape - { - // Dictionary object with extension-specific objects. - public glTFExtension Extensions; - - // Application-specific data. - public glTFExtension Extras; - - public ColliderShapeSphere Sphere; - - public ColliderShapeCapsule Capsule; - } - - public class VRMC_node_collider - { - public const string ExtensionName = "VRMC_node_collider"; - public static readonly Utf8String ExtensionNameUtf8 = Utf8String.From(ExtensionName); - - // Dictionary object with extension-specific objects. - public glTFExtension Extensions; - - // Application-specific data. - public glTFExtension Extras; - - public List Shapes; - } -} diff --git a/Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs.meta b/Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs.meta deleted file mode 100644 index 065d2245e..000000000 --- a/Assets/VRM10/Runtime/Format/NodeCollider/Format.g.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b1f73d7cedc49cb4d9513f7a0a9ae9b6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs b/Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs deleted file mode 100644 index 5fc75ed36..000000000 --- a/Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs +++ /dev/null @@ -1,160 +0,0 @@ -// This file is generated from JsonSchema. Don't modify this source code. -using System; -using System.Collections.Generic; -using System.Linq; -using UniJSON; - -namespace UniGLTF.Extensions.VRMC_node_collider { - - static public class GltfSerializer - { - - public static void SerializeTo(ref UniGLTF.glTFExtension dst, VRMC_node_collider extension) - { - if (dst is glTFExtensionImport) - { - throw new NotImplementedException(); - } - - if (!(dst is glTFExtensionExport extensions)) - { - extensions = new glTFExtensionExport(); - dst = extensions; - } - - var f = new JsonFormatter(); - Serialize(f, extension); - extensions.Add(VRMC_node_collider.ExtensionName, f.GetStoreBytes()); - } - - -public static void Serialize(JsonFormatter f, VRMC_node_collider value) -{ - f.BeginMap(); - - - if(value.Extensions!=null){ - f.Key("extensions"); - value.Extensions.Serialize(f); - } - - if(value.Extras!=null){ - f.Key("extras"); - value.Extras.Serialize(f); - } - - if(value.Shapes!=null&&value.Shapes.Count()>=0){ - f.Key("shapes"); - Serialize_Shapes(f, value.Shapes); - } - - f.EndMap(); -} - -public static void Serialize_Shapes(JsonFormatter f, List value) -{ - f.BeginList(); - - foreach(var item in value) - { - Serialize_Shapes_ITEM(f, item); - - } - f.EndList(); -} - -public static void Serialize_Shapes_ITEM(JsonFormatter f, ColliderShape value) -{ - f.BeginMap(); - - - if(value.Extensions!=null){ - f.Key("extensions"); - value.Extensions.Serialize(f); - } - - if(value.Extras!=null){ - f.Key("extras"); - value.Extras.Serialize(f); - } - - if(value.Sphere!=null){ - f.Key("sphere"); - Serialize_Sphere(f, value.Sphere); - } - - if(value.Capsule!=null){ - f.Key("capsule"); - Serialize_Capsule(f, value.Capsule); - } - - f.EndMap(); -} - -public static void Serialize_Sphere(JsonFormatter f, ColliderShapeSphere value) -{ - f.BeginMap(); - - - if(value.Offset!=null&&value.Offset.Count()>=3){ - f.Key("offset"); - Serialize_Offset(f, value.Offset); - } - - if(value.Radius.HasValue){ - f.Key("radius"); - f.Value(value.Radius.GetValueOrDefault()); - } - - f.EndMap(); -} - -public static void Serialize_Offset(JsonFormatter f, float[] value) -{ - f.BeginList(); - - foreach(var item in value) - { - f.Value(item); - - } - f.EndList(); -} - -public static void Serialize_Capsule(JsonFormatter f, ColliderShapeCapsule value) -{ - f.BeginMap(); - - - if(value.Offset!=null&&value.Offset.Count()>=3){ - f.Key("offset"); - Serialize_Offset(f, value.Offset); - } - - if(value.Radius.HasValue){ - f.Key("radius"); - f.Value(value.Radius.GetValueOrDefault()); - } - - if(value.Tail!=null&&value.Tail.Count()>=3){ - f.Key("tail"); - Serialize_Tail(f, value.Tail); - } - - f.EndMap(); -} - -public static void Serialize_Tail(JsonFormatter f, float[] value) -{ - f.BeginList(); - - foreach(var item in value) - { - f.Value(item); - - } - f.EndList(); -} - - } // class -} // namespace diff --git a/Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs.meta b/Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs.meta deleted file mode 100644 index 2d2f3390b..000000000 --- a/Assets/VRM10/Runtime/Format/NodeCollider/Serializer.g.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8eb6c9672b71ea147867c73cb8d58a35 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs index bb20f8477..f87d172c9 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs @@ -24,7 +24,6 @@ namespace UniVRM10 Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_vrm.VRMC_vrm.ExtensionName); Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_materials_mtoon.VRMC_materials_mtoon.ExtensionName); Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_springBone.VRMC_springBone.ExtensionName); - Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider.ExtensionName); Storage.Gltf.extensionsUsed.Add(UniGLTF.Extensions.VRMC_node_constraint.VRMC_node_constraint.ExtensionName); Storage.Gltf.buffers.Add(new glTFBuffer { @@ -264,14 +263,14 @@ namespace UniVRM10 return (vrm, vrmSpringBone, thumbnailTextureIndex); } - UniGLTF.Extensions.VRMC_node_collider.ColliderShape ExportShape(VRM10SpringBoneCollider z) + UniGLTF.Extensions.VRMC_springBone.ColliderShape ExportShape(VRM10SpringBoneCollider z) { - var shape = new UniGLTF.Extensions.VRMC_node_collider.ColliderShape(); + var shape = new UniGLTF.Extensions.VRMC_springBone.ColliderShape(); switch (z.ColliderType) { case VRM10SpringBoneColliderTypes.Sphere: { - shape.Sphere = new UniGLTF.Extensions.VRMC_node_collider.ColliderShapeSphere + shape.Sphere = new UniGLTF.Extensions.VRMC_springBone.ColliderShapeSphere { Radius = z.Radius, Offset = ReverseX(z.Offset), @@ -281,7 +280,7 @@ namespace UniVRM10 case VRM10SpringBoneColliderTypes.Capsule: { - shape.Capsule = new UniGLTF.Extensions.VRMC_node_collider.ColliderShapeCapsule + shape.Capsule = new UniGLTF.Extensions.VRMC_springBone.ColliderShapeCapsule { Radius = z.Radius, Offset = new float[] { z.Offset.x, z.Offset.y, z.Offset.z }, @@ -311,6 +310,7 @@ namespace UniVRM10 { var springBone = new UniGLTF.Extensions.VRMC_springBone.VRMC_springBone { + ColliderGroups = new List(), Springs = new List(), }; @@ -338,14 +338,14 @@ namespace UniVRM10 colliders.Add(nodeIndex); var gltfNode = Storage.Gltf.nodes[nodeIndex]; - // VRMC_node_collider - var collider = new UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider - { - Shapes = y.Colliders.Select(ExportShape).ToList(), - }; + // // VRMC_node_collider + // var collider = new UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider + // { + // Shapes = y.Colliders.Select(ExportShape).ToList(), + // }; - // serialize - UniGLTF.Extensions.VRMC_node_collider.GltfSerializer.SerializeTo(ref gltfNode.extensions, collider); + // // serialize + // UniGLTF.Extensions.VRMC_node_collider.GltfSerializer.SerializeTo(ref gltfNode.extensions, collider); } spring.ColliderGroups = colliders.ToArray(); } diff --git a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs index 0c4d001f4..03c6b5e1d 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs @@ -396,51 +396,51 @@ namespace UniVRM10 } } - // collider - springBone.ColliderGroups.AddRange(gltfSpring.ColliderGroups.Select(colliderNode => - { - if (UniGLTF.Extensions.VRMC_node_collider.GltfDeserializer.TryGet(Parser.GLTF.nodes[colliderNode].extensions, - out UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider extension)) - { - var node = Nodes[colliderNode]; - var colliderGroup = node.gameObject.GetComponent(); - if (colliderGroup == null) - { - colliderGroup = node.gameObject.AddComponent(); - colliderGroup.Colliders.AddRange(extension.Shapes.Select(x => - { - if (x.Sphere != null) - { - return new VRM10SpringBoneCollider - { - ColliderType = VRM10SpringBoneColliderTypes.Sphere, - Offset = Vector3InvertX(x.Sphere.Offset), - Radius = x.Sphere.Radius.Value, - }; - } - else if (x.Capsule != null) - { - return new VRM10SpringBoneCollider - { - ColliderType = VRM10SpringBoneColliderTypes.Capsule, - Offset = Vector3InvertX(x.Capsule.Offset), - Radius = x.Capsule.Radius.Value, - Tail = Vector3InvertX(x.Capsule.Tail), - }; - } - else - { - throw new NotImplementedException(); - } - })); - } - return colliderGroup; - } - else - { - return null; - } - }).Where(x => x != null)); + // // collider + // springBone.ColliderGroups.AddRange(gltfSpring.ColliderGroups.Select(colliderNode => + // { + // if (UniGLTF.Extensions.VRMC_node_collider.GltfDeserializer.TryGet(Parser.GLTF.nodes[colliderNode].extensions, + // out UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider extension)) + // { + // var node = Nodes[colliderNode]; + // var colliderGroup = node.gameObject.GetComponent(); + // if (colliderGroup == null) + // { + // colliderGroup = node.gameObject.AddComponent(); + // colliderGroup.Colliders.AddRange(extension.Shapes.Select(x => + // { + // if (x.Sphere != null) + // { + // return new VRM10SpringBoneCollider + // { + // ColliderType = VRM10SpringBoneColliderTypes.Sphere, + // Offset = Vector3InvertX(x.Sphere.Offset), + // Radius = x.Sphere.Radius.Value, + // }; + // } + // else if (x.Capsule != null) + // { + // return new VRM10SpringBoneCollider + // { + // ColliderType = VRM10SpringBoneColliderTypes.Capsule, + // Offset = Vector3InvertX(x.Capsule.Offset), + // Radius = x.Capsule.Radius.Value, + // Tail = Vector3InvertX(x.Capsule.Tail), + // }; + // } + // else + // { + // throw new NotImplementedException(); + // } + // })); + // } + // return colliderGroup; + // } + // else + // { + // return null; + // } + // }).Where(x => x != null)); } } } diff --git a/Assets/VRM10/Runtime/Migration/MigrationVrmSpringBone.cs b/Assets/VRM10/Runtime/Migration/MigrationVrmSpringBone.cs index fa7be5a04..10b91d1a6 100644 --- a/Assets/VRM10/Runtime/Migration/MigrationVrmSpringBone.cs +++ b/Assets/VRM10/Runtime/Migration/MigrationVrmSpringBone.cs @@ -23,16 +23,22 @@ namespace UniVRM10 { var colliderNodes = new List(); + var springBone = new UniGLTF.Extensions.VRMC_springBone.VRMC_springBone + { + ColliderGroups = new List(), + Springs = new List(), + }; + foreach (var x in sa["colliderGroups"].ArrayItems()) { var node = x["node"].GetInt32(); colliderNodes.Add(node); - var gltfNode = gltf.nodes[node]; - var collider = new UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider() + var colliderGroup = new UniGLTF.Extensions.VRMC_springBone.ColliderGroup() { - Shapes = new List(), + Colliders = new List(), }; + springBone.ColliderGroups.Add(colliderGroup); // { // "node": 14, @@ -65,31 +71,20 @@ namespace UniVRM10 // }, foreach (var y in x["colliders"].ArrayItems()) { - collider.Shapes.Add(new UniGLTF.Extensions.VRMC_node_collider.ColliderShape + colliderGroup.Colliders.Add(new UniGLTF.Extensions.VRMC_springBone.Collider { - Sphere = new UniGLTF.Extensions.VRMC_node_collider.ColliderShapeSphere + Shape = new UniGLTF.Extensions.VRMC_springBone.ColliderShape { - Offset = MigrateVector3.Migrate(y["offset"]), - Radius = y["radius"].GetSingle() + Sphere = new UniGLTF.Extensions.VRMC_springBone.ColliderShapeSphere + { + Offset = MigrateVector3.Migrate(y["offset"]), + Radius = y["radius"].GetSingle() + } } }); } - - if (!(gltfNode.extensions is UniGLTF.glTFExtensionExport extensions)) - { - extensions = new UniGLTF.glTFExtensionExport(); - gltfNode.extensions = extensions; - } - - var f = new JsonFormatter(); - UniGLTF.Extensions.VRMC_node_collider.GltfSerializer.Serialize(f, collider); - extensions.Add(UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider.ExtensionName, f.GetStoreBytes()); } - var springBone = new UniGLTF.Extensions.VRMC_springBone.VRMC_springBone - { - Springs = new List(), - }; foreach (var x in sa["boneGroups"].ArrayItems()) { // { @@ -123,7 +118,7 @@ namespace UniVRM10 var spring = new UniGLTF.Extensions.VRMC_springBone.Spring { Name = comment, - ColliderGroups = x["colliderGroups"].ArrayItems().Select(z => colliderNodes[z.GetInt32()]).ToArray(), + ColliderGroups = x["colliderGroups"].ArrayItems().Select(z => z.GetInt32()).ToArray(), Joints = new List(), }; diff --git a/Assets/VRM10/Tests/MigrationTests.cs b/Assets/VRM10/Tests/MigrationTests.cs index 7b136a2c4..f85879212 100644 --- a/Assets/VRM10/Tests/MigrationTests.cs +++ b/Assets/VRM10/Tests/MigrationTests.cs @@ -245,11 +245,10 @@ namespace UniVRM10 Assert.True(UniGLTF.Extensions.VRMC_springBone.GltfDeserializer.TryGet(parser1.GLTF.extensions, out UniGLTF.Extensions.VRMC_springBone.VRMC_springBone springBone)); var spring = springBone.Springs[0]; var colliderNodeIndex = spring.ColliderGroups[0]; - Assert.True(UniGLTF.Extensions.VRMC_node_collider.GltfDeserializer.TryGet(parser1.GLTF.nodes[colliderNodeIndex].extensions, out UniGLTF.Extensions.VRMC_node_collider.VRMC_node_collider colliderGroup)); // x軸だけが反転する - Assert.AreEqual(-VALUE.x, colliderGroup.Shapes[0].Sphere.Offset[0]); - Assert.AreEqual(VALUE.y, colliderGroup.Shapes[0].Sphere.Offset[1]); - Assert.AreEqual(VALUE.z, colliderGroup.Shapes[0].Sphere.Offset[2]); + Assert.AreEqual(-VALUE.x, springBone.ColliderGroups[0].Colliders[0].Shape.Sphere.Offset[0]); + Assert.AreEqual(VALUE.y, springBone.ColliderGroups[0].Colliders[0].Shape.Sphere.Offset[1]); + Assert.AreEqual(VALUE.z, springBone.ColliderGroups[0].Colliders[0].Shape.Sphere.Offset[2]); } } }