animator 的matchtarget目标匹配

 //anim.IsInTransition(0)切换期间不能使用matchtarget.
        if (anim.GetCurrentAnimatorStateInfo(0).IsName("Vault")&&!anim.IsInTransition(0))
        {
            print(matchTarget);
            //左手的匹配,最后两个参数是差值的运算的时间
            anim.MatchTarget(matchTarget, Quaternion.identity, AvatarTarget.LeftHand, new MatchTargetWeightMask(Vector3.one,0),0.26f,0.40f);
        }

猜你喜欢

转载自blog.csdn.net/wk6sae88/article/details/81632755