Sorry for this silly queston but I’m not good at coding at all. I have a very simple 3rd Person controller script, many animations, but so far I’ve only integrated a ‘run’ and ‘idle.’ I know almost nothing about Javascript and I don’t plan to know more soon especially because my current project requires very little scripting. I know how to add independant animations like ‘bark’ or ‘sit’ on keypress, but I’d love to know how to reduce to 4 speed on my main controller script (below) and crossfade to the walk animation when the left shift is held. This is my script:
function Update () {
if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1)
animation.CrossFade("Run");
else
animation.CrossFade("Idle2");
}
I’d also like to be able to play random Idle animations at different times, but I know this is another question…
But you will have to figure out how to time the CrossFade() of the idle animations so that you will get a smoother transition between different idle animations. You can use CrossFadeQueue(), but you will have to figure out how to code that part yourself.