Help. I do not know how to do when you hold the left shift is a character starts to run and release it when the form starts normally go.
This is my script "Movement"
# pragma strict
var animator: Animator;
var h: float;
var v: float;
function Start () {
animator = GetComponent (Animator);
}
function Update () {
h = Input.GetAxis ('Horizontal');
v = Input.GetAxis ('Vertical');
if (Input.GetButton ('Jump'))
animator.SetBool ('Jump', true);
else
animator.SetBool ('Jump', false);
}
FixedUpdate function () {
animator.SetFloat ('Speed', v);
animator.SetFloat ('directrion', h);
}
↧