title: Unity2D: implementing a running effect to my character
body: <p>I'm trying to achieve the same effect done Knuckles does in the new game Sonic mania, the effect can be seen <a href="https://www.youtube.com/watch?v=QrPky7eUV00" rel="nofollow noreferrer">here</a> (2:18 - 2:25). So far I duplicated my main player and lowered the duplicated players alpha so that it looks a bit transparent, I also added the script below on the duplicated player to give the duplicated player some distance to the original player; however I wasn't quite sure how I can make the duplicated players slowly return the original player when the player isn't moving! I attempt using animation but it didn't look as good as what was shown in the video, I also tired to shorten the distance over Time.deltaTime however it still didn't look effective! Is there a better way of attempting the same effect shown in the video?? Thank you :)</p>
  
  <pre><code>public GameObject Player;
  public float distance = 0.75f;
  
  // Use this for initialization
  void Start () {
      distance = 0.42f;
  }
  
  // Update is called once per frame
  void Update () {
      transform.position = (transform.position - Player.transform.position).normalized * distance + Player.transform.position;
  }
  </code></pre>