3 // help the character turn faster (this is in addition to root rotation in the animation) 4 //由 180线性插值到 360,插值幅度为 前进分量在z轴上的分量,这里也就意味着,转向越大,那么转身速度增加得越慢 5 float turnSpeed = Mathf.Lerp(m_StationaryTurnSpeed, m_MovingTurnSpeed, m_ForwardAmoun...
public class animator : MonoBehaviour {Animator anim;AnimatorStateInfo animatorInfo;void Start () {a...
public class animator : MonoBehaviour { Animator anim;AnimatorStateInfo animatorInfo;void Start () { anim=GetComponent<Animator>();} void Update () { animatorInfo=anim.GetCurrentAnimatorStateInfo(0);if(animatorInfo.IsName("Take 001"))//注意这里指的不是动画的名字而是动画状态的名字 {...
public class animator : MonoBehaviour { Animator anim;AnimatorStateInfo animatorInfo;void Start () {...