using UnityEngine;
using System.Collections;

public class CameraFollowSquirrel : MonoBehaviour {

	// Use this for initialization
	void Start () {
		Quaternion target = Quaternion.Euler(new Vector3(0.0f, 180.0f, 0.0f));
		this.transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime);
		this.transform.position = new Vector3 (6.0f, -2.0f, 17.0f);

	}
	
	// Update is called once per frame
	void Update () {
		if (this.transform.position.x >= -1.0f) {
			this.transform.position = new Vector3 (transform.position.x - 0.005f,
		                                       		transform.position.y + 0.0f,
		                                       		transform.position.z + 0.0f);
		}
	
	}
}
