using UnityEngine;
using System.Collections;

public class ParallaxMover : MonoBehaviour {

	public float TrailFactor=0.5f;
	private Vector3 origPos;
	private Transform cam;

	// Use this for initialization
	void Start () {
		origPos = transform.position;
		cam = GameObject.Find ("Main Camera").transform;
	}
	
	// Update is called once per frame
	void Update () {
		Vector3 target = origPos + cam.position * TrailFactor;
		transform.position = target;
	}
}
