var _mainCamera : GameObject;
var _follower : GameObject;
var _initialPosition : Vector2 = Vector2.zero;
var _pointerPosition : Vector2 = Vector2.zero;
private var _followerVel : Vector3 = Vector3.zero;
private var _followSpeed = 0.3;


function Awake (){
	_mainCamera.GameObject.Find("MainCamera");
	}

function OnTriggerEnter(other : Collider){
		other.transform.gameObject.GetComponent(BarrelDashReaction)._pointerPosition = _pointerPosition;
		other.transform.gameObject.GetComponent(BarrelDashReaction).slice();
	}
	
function Update () {
	_follower.transform.position=Vector3.SmoothDamp(_follower.transform.position,transform.position,_followerVel,_followSpeed);	
	
	_initialPosition = Vector2(transform.position.x,transform.position.y);
	_pointerPosition = Vector2(_initialPosition.x,_initialPosition.y);
}