I created a 2D blend tree that blends a forward and backward walk animation with a left and right sidestep animation. It works in the preview window but it’s not working in-game. Here is a screen of the blend tree:
Here is my current script:
public class PlayerControllerScript : MonoBehaviour {
Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
float move = Input.GetAxis("Vertical");
float sidestep = Input.GetAxis("Horizontal");
anim.SetFloat("Speed", move);
anim.SetFloat("Direction", sidestep);
}
}
In the Animator, Speed and Direction are increasing and decreasing correctly with the right input but my character is not moving. Is there a problem with my script, my blend tree, or both?