using UnityEngine;
using System.Collections;

public class BGScroller : MonoBehaviour {

	// References to camera object
	private GameObject cam;
	private Transform bg_Target;

	// Attributes
	private Vector3 offset = new Vector3 (0.0f, 0.0f, 10.0f);

	// Use this for initialization
	void Start () 
	{
		cam = GameObject.Find("MultipurposeCameraRig");
		bg_Target =  cam.GetComponent<Transform>();

	}
	
	// Update is called once per frame
	void Update () 
	{
		// BG position and rotation locked to camera position:
		//transform.position = Vector3.Lerp(transform.position, bg_Target.position , Time.deltaTime*moveSpeed);
		transform.position = bg_Target.position;// + offset;
	}
}
