Kariaro / VRigUnity

VRM hand tracking using mediapipe
https://discord.com/invite/Enaup9TJPd
MIT License
149 stars 31 forks source link

The arm won't move. #95

Closed qq357075581 closed 3 months ago

qq357075581 commented 3 months ago

Hi author, I copied the code into a new project (only the model and Solution nodes remain in the scenario). When running the project, the arms of the model will not move, and the upper body, head, and hands can move normally. Do you know what causes this? I turn on all the bone nodes when I can turn on the camera.This question has been bothering me for a long time...

20240326150247 `public void onBtnClick() { SetCamera(!isCameraShowing); }

private void SetCamera(bool enable)
{
    isCameraShowing = enable;
    for (int i = 0; i < 14; i++)
    {
        BoneSettings.Set(i, enable);
        SolutionUtils.GetSolution().Model.OnBoneUpdate(i, enable);
    }
    if (enable)
    {
        SolutionUtils.GetSolution().Play((_, _) => {
            // Error handling
            SetCamera(false);
        });
    }
    else
    {
        SolutionUtils.GetSolution().Model.ResetVRMAnimator();
        SolutionUtils.GetSolution().Stop();
    }
}`

20240326150148

Kariaro commented 3 months ago

It’s very hard to debug code when I don’t know how you’re using the code. If the head and hands works it sounds like the bone setting has arms turned off

qq357075581 commented 3 months ago

Thank you very much. I think I found the reason. I made a mistake...

qq357075581 commented 3 months ago

Read your project let me learn a lot, the author is too powerful!