using UnityEngine;
using System.Collections;

public class Distance : MonoBehaviour {
    public GameObject Target;
    public  bool inRange;
	// Use this for initialization
	void Start () {
        
	}
	
	// Update is called once per frame
	void Update () {


      //  if (Vector3.Distance(Camera.main.ScreenToWorldPoint(Input.mousePosition), Target.transform.position) < maxDistance)
        if(true)
        {
           // Debug.Log("In Range!");
            Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            mousePos.z = 0;
            this.transform.position = mousePos;
        }
        

      
     
	}
}
