I am working on my final project and it is completed, but I have the issue that when I export it, both my enemies and my character move much slower than during emulation and programming. The code that moves the character is the following:
if(Input.GetKey(KeyCode.W)){
this.transform.position += new Vector3(0, movY, 0);
//Damos los valores en la animación en caso de que pulsen las teclas
animaciones.SetFloat("Vertical", 1);
animaciones.SetBool("Movimiento", true);
}
else if(Input.GetKey(KeyCode.S)){
this.transform.position += new Vector3(0, -movY, 0);
animaciones.SetFloat("Vertical", -1);
animaciones.SetBool("Movimiento", true);
}
if(Input.GetKey(KeyCode.D)){
this.transform.position += new Vector3(movX, 0, 0);
animaciones.SetFloat("Horizontal", 1);
animaciones.SetBool("Movimiento", true);
}
else if(Input.GetKey(KeyCode.A)){
this.transform.position += new Vector3(-movX, 0, 0);
animaciones.SetFloat("Horizontal", -1);
animaciones.SetBool("Movimiento", true);
}