#pragma strict

public var target : Transform;
private var navComponent : NavMeshAgent;

function Start () 
{
	navComponent = this.transform.GetComponent(NavMeshAgent);
}

function Update ()
{
	navComponent.SetDestination(target.position);
}