-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.0] Importerを修正 #882
[1.0] Importerを修正 #882
Conversation
ousttrue
commented
Apr 16, 2021
- VRM部分(SpringBone, Constraint)で座標変換が無かった
Mesh, Node は、VrmLib.Model を介して座標変換されている。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
よいけど一点だけ
Assets/VRM10/Tests/MigrationTests.cs
Outdated
var colliderNodeIndex = spring.Colliders[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)); | ||
Assert.AreEqual(-VALUE, colliderGroup.Shapes[0].Sphere.Offset[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ヨシ!
直感的ではないが、VRM 0.x の事情と、1.0 への変換を色々やると結局考慮すると X だけが反転する、とのこと。
ただ Test としては Y と Z の値の Assert もやっといたほうがよさそう
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ヨシ!