using UnityEngine;
using System.Collections;

public class ShadowFollowPlayer : MonoBehaviour {

	GameObject Player;

	public float speedOfShadowFollowPlayer = 5f;

	void Start () {
		Player = GameObject.Find ("Player");
	}
	
	// Update is called once per frame
	void Update () {
		MoveTowards ();
	}

	void MoveTowards()
	{
		Vector3 ThisCharacterPos = gameObject.transform.position;
		Vector3 TargetPos = Player.transform.position;
		transform.position = Vector3.Lerp (ThisCharacterPos, TargetPos, Time.deltaTime * speedOfShadowFollowPlayer);
	}
}
