I’m in big trouble,
my player animates correctly
but he does not move, it goes nowhere
and appears an old car with a problem!
Anyone know what I’m doing wrong?
someone knows how to solve my problem please?
I’m doing a football game and takes a lot of use this new tool!
[9007-primeira+imagem.png|9007]
[9008-segunda+imagem.png|9008]
http://img94.imageshack.us/img94/3869/terceiraimagem.png
using UnityEngine;
using System.Collections;
public class messiControle : MonoBehaviour {
protected Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
float V = Input.GetAxis("Vertical");
// float H = Input.GetAxis("Horizontal");
Vector3 MoveDirection = new Vector3(0, 0, V);
V = Mathf.Clamp(MoveDirection.magnitude, 0, 1) ;
anim.SetFloat("velocidade", V);
print("run");
}
}
