- Home /
animation help with falling when not grounded?
hey this is my code for my mesh within my character controler so that he animates can anyone help fixing it?
#pragma strict
function Start () {
}
function Update () {
if (Input.GetAxis("Vertical") > 0.1 || Input.GetAxis("Vertical") <-0.1)
animation.CrossFade ("walk");
else
animation.CrossFade ("idle");
if (Input.GetAxis("Horizontal") > 0.1)
animation.CrossFade("walkr");
else if
(Input.GetAxis("Horizontal") < -0.1)
animation.CrossFade("walkl");
}
all i want is when the player isent touching the ground play the falling ('jump') animation, and when touching the ground play the walk/idle one. the script is in the mesh prefab thing within the fps controller
Comment
@killa247 please edit the title of your question to indicate your problem.
Also you aren't program$$anonymous$$g in Java, it's Javascript
And, technically, UnityScipt, although it's much like JScript (such a rich heritage)