I'm making a game in unity 2d and when my player goes in to a wall he gets stuck and can't move at all. Here is a video:

[VIDEO](http://%3Ciframe%20width=%22560%22%20height=%22315%22%20src=%22https://www.youtube.com/embed/VaZMYruFUcg%22%20frameborder=%220%22%20allow=%22accelerometer;%20autoplay;%20encrypted-media;%20gyroscope;%20picture-in-picture%22%20allowfullscreen%3E%3C/iframe%3E)

I've tried using a composite collider, physics material with friction at 0.

Here is my movement script:

```cs
public class PlayerMovement : MonoBehaviour
{
    Vector3 pos;
    float speed = 2.0f;
    private Animator animator;
    void Start()
    {
        pos = transform.position;
        animator = gameObject.GetComponent<Animator>();
    }

    void FixedUpdate()
    {
        if (Input.GetKey(KeyCode.W) && transform.position == pos)
        {        // Up
            animator.SetInteger("isWalking", 1);
            pos += Vector3.up;
        }
        if (Input.GetKey(KeyCode.S) && transform.position == pos)
        {        // Down
            animator.SetInteger("isWalking", 2);
            pos += Vector3.down;
        }
        if (Input.GetKey(KeyCode.D) && transform.position == pos)
        {        // Right
            animator.SetInteger("isWalking", 3);
            pos += Vector3.right;
        }
        if (Input.GetKey(KeyCode.A) && transform.position == pos)
        {        // Left
            animator.SetInteger("isWalking", 4);
            pos += Vector3.left;
        }
        if (Input.anyKey == false)
            animator.SetInteger("isWalking", 0);
        transform.position = Vector3.MoveTowards(transform.position, pos, Time.deltaTime * speed);
    }
}

```