[0.x][springbone][center] Imported VRM hair and clothes goes to the left no matter the position
- UniVRM version:
0.126.0 - Unity version:
Unity-2022.3.17 - OS:
Windows 10
Minimum steps to reproduce
0.126.0 ~
- vrm-0.x that has
center( vroid model hascenter) - move vrm-0.x from origin( move
centerfrom origin )
Describe the bug
- Using Vroid Studio 1.29.2 from Steam I create a character vertion VRM0.0 and update it using UniVRM, but all the models imported do the same
- The hair and clothes goes to the left no matter where the character is looking once I start the game in Unity
with the game off they looks good
And sprint bones looks like this
Here is the VRM character if you would like to test, maybe is the character but I have tried it in 2 different projects and always does the same. https://drive.google.com/file/d/1TlG2lNjFKh0vNnVsZu9cukKcWMTk0Tg2/view?usp=drive_link
One solution I found is in the file secondary inside the model every part of the model have hit radious as 0 and drag force as 1, the movement could be a little strange with some animations but it works till the new release :D
I add a solution to this problem, that is change the values manual, if someone is having the same problem with the vertion 0.126 will help :D
Regards!
It's not fixed in v0.127.0 either. What I have found is that SpringBone goes wrong if I load an avatar and then use SetParent on a parent object that is not the origin to make the avatar a child. If the parent object was at the origin, it may work properly.
Set avatars as GameObject children. If you move the position of the GameObject, SpringBone will go wrong. If you look at the direction SpringBone's Gizmo is facing, it points to where the avatar would be if it were at the origin. So I think one of the transforms in SpringBone is using world coordinates.
GameObjectの子供にアバターをセットします。 GameObjectの位置を動かすとSpringBoneがおかしくなります。 SpringBoneのGizmoの向いている方向を見ると、アバターが原点にいた場合の位置を指しています。 つまりSpringBoneの中にあるtransformのどれかがワールド座標を使っているのだと思います。
SpringBone has been cleaned up, so please try it with ~~v0.128~~ v0.127.1 or later.
If it doesn't work,
Please let us know which springbone (vrm0.x, vrm0.x-fast or vrm1.0).
Hello I test the version v0.127.1 with a vrm0.x, and its working the same way
SpringBone has been cleaned up, so please try it with ~
v0.128~v0.127.1or later. If it doesn't work, Please let us know which springbone (vrm0.x, vrm0.x-fast or vrm1.0).
I tried it myself, but v0.127.1 did not fix the problem.
Please tell me the steps to initialize SpringBone. Which of the following four?
- 0.x runtime load
- 0.x Scene placement start
- 1.0 runtime load
- 1.0 Start scene placement
I think runtime load has been resolved. If scene placement, I will add a solution when the model is not facing forward at the origin.
Please tell me the steps to initialize SpringBone. Which of the following four?
- 0.x runtime load
- 0.x Scene placement start
- 1.0 runtime load
- 1.0 Start scene placement
I think runtime load has been resolved. If scene placement, I will add a solution when the model is not facing forward at the origin.
[0.x runtime load] It can also be reproduced in UniVRM_Samples-0.127.1_0214.
- Place a GameObject on the Scene and play it. GameObject should have rotation.y set to 180 (it does not have to be the origin).
- Make the runtime loaded model a child of the GameObject with SetParent. Then SpringBone will behave incorrectly.
public class VRMRuntimeExporter : MonoBehaviour
{
[SerializeField]
public GameObject obj;
async void Load()
{
/*
// omission
*/
m_model = loaded.gameObject;
m_model.transform.SetParent(obj.transform, false);
}
}
I thought it was an initialization bug.
It doesn't reproduce on Alicia, but it occurs on Vroid, so I investigated.
It seems like a bug in center. I'll fix it.
https://github.com/vrm-c/UniVRM/releases/tag/v0.127.2
fixed !.
https://github.com/vrm-c/UniVRM/releases/tag/v0.127.2
fixed !.
I have checked v0.127.2 and it seems to be working properly. thank you so much.