Hi, I want to add animations to the movements of the main character of my game. Make her run, jump, etc. I have the animations and I’ve made an Animator Controller with every animation I want to use at the moment:
I’m trying only the one for runing:
public class Movimiento1 : MonoBehaviour
{
Animator anim;
}
void Start()
{
anim = GetComponent();
}
void Update()
if (Input.GetKey(“w”))
{
transform.Translate(Vector3.forward * Time.deltaTime * Velocidad);
anim.Play(“run”);
}
The thing is that the animations are not played. I can move the character but the animations don’t work. Where is the problem??