Check out example codes for "chase object unity". It will help you in understanding the concepts better.

Code Example 1

function Update(){
  transform.position = Vector3.MoveTowards(transform.position, targ.transform.position, .03);
}

Learn ReactJs, React Native from akashmittal.com