纳金网

标题: Mecanim问题?Animator.MatchTarget [打印本页]

作者: 比巴卜    时间: 2013-5-17 09:28
标题: Mecanim问题?Animator.MatchTarget
Model Rig 是选 Generic
有勾apply root motion 和 animate physics我的AnimatorController 里面有两层
底层(Base layer) - 角色跑,普攻打人
第二层(Layer 2) - 技能(跳打)
如果在用底层的动画时,例如正在普攻打人,而瞬间按技能,第二层的动画会马上覆盖第一层。这里没问题
当我站在山上用跳打(跳打过程不受地心吸力影响),动画播完后他会在空中停留一下,然后才会在地心吸力下坠落到山脚。这也没问题


问题是我用了
if (hitInfo.distance > 6.8f)
_animator.MatchTarget (hitInfo.point, Quaternion.identity, AvatarTarget.Root, new MatchTargetWeightMask(new Vector3(0, 1, 0), 0), 0.55f, 0.9f);
他应该是在下坠的时后,如果角色和地面的距离超过6.8f,并在动画的55%-90%之间的话,就会掉去地面。但却不成功。


想问的是animator.MatchTarget不能再layer2用吗?
有的话请教教我!!


作者: ken7777    时间: 2013-5-17 11:32
Target matching only works on the base layer (index 0).

看脚本说明里




欢迎光临 纳金网 (http://go.narkii.com/club/) Powered by Discuz! X2.5