Mon script actuel :
public Animator animator;
public float InputX;
public float InputY;
// Start is called before the first frame update
void Start()
{
animator = GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
InputY = Input.GetAxis("Vertical");
InputX = Input.GetAxis("Horizontal");
InputZ = Input.GetAxis("");
if (Input.GetKey(KeyCode.Z))
{
animator.SetFloat("InputX", InputX);
}
animator.SetFloat("InputY", InputY);
}
}