Hi! I’m new to animation and scripting. . . . especially scripting!! . . . and had a question regarding activating a run cycle. My animation is imported and working in Unity as a split animation (idle, walk, run). I used the script from the manual to get the idle and walk working.
function Update ()
{
if (Input.GetAxis(“Vertical”) >0.2)
animation.CrossFade (“walk”);
else
animation.CrossFade (“idle”);
}
and would like to add another crossfade for “run”. Could I set up an input key like “R” to enable the run cycle to begin? I’d appreciate assistance or direction. Thank You. - paul