first person view unity

C
// C Sharp
public Transform followTarget;
public Vector3 targetOffset;
public float moveSpeed = 2f;
private Transform myTransform;

void Start(){
 myTransform = transform; 
}

public void SetTarget(Transfrom aTransform){
 followTarget = aTransform; 
}

void LateUpdate(){
 if(followTarget != null){
  	myTransform.position = Vector3.Lerp(myTransform.position, followTarget.position + targetOffset, moveSpeed * Time.deltaTime); 
 }
}


Source

Also in C: