Every time that i go from left to the right the animation is not smooth, the animation change to Idle then go to right.
The animator make the change if “Walk”==true then change to walk, else change to Idle.

“X” and “Y” are the variables of the blend tree.
The little Script that make the Character move.
// Use this for initialization
void Start () {
rb=GetComponent<Rigidbody>();
anim = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
float moveX = Input.GetAxis ("Horizontal");
float moveZ = Input.GetAxis ("Vertical");
anim.SetFloat ("X", moveX);
anim.SetFloat ("Y", moveZ);
if (moveX != 0 || moveZ != 0) {
rb.velocity = new Vector3 (moveX * speed * Time.deltaTime, rb.velocity.y, moveZ * speed * Time.deltaTime);
anim.SetBool ("Walk", true);
} else {
anim.SetBool("Walk",false);
}
}
PS: i know that i have to improve the movement script!