Following a Unity-snake tutorial, but the controls have a delay
<p>I am following a tutorial on making a snake game in unity. The problem is there is a small but very noticeable delay when I hit a key and when the snake actually turns. The delay is inconsistent, sometimes I'm able to make a perfect U-turn other times it will skip a few blocks before the U-turn completes. It's a big deal because it's a fast game that is all about timing.</p>

<p>Thanks for any help! Here is the code:</p>

<pre><code>using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public class Snake : MonoBehaviour {
    int frame = 0;
    Vector2 dir = Vector2.right;

    void Start()
    {// repeats Move function
        InvokeRepeating("Move", 0.1f, 0.05f);
    }


    // Update is called once per frame
    void Update () {
        frame += 1;
        // Move in a new Direction?
        if (Input.GetKey(KeyCode.RightArrow))
            dir = Vector2.right;
        else if (Input.GetKey(KeyCode.DownArrow))
            dir = -Vector2.up;    // '-up' means 'down'
        else if (Input.GetKey(KeyCode.LeftArrow))
            dir = -Vector2.right; // '-right' means 'left'
        else if (Input.GetKey(KeyCode.UpArrow))
            dir = Vector2.up;
    }

        void Move() {
        transform.Translate(dir);
    }
}
</code></pre>