Check out example codes for "vector between two points unity". It will help you in understanding the concepts better.

Code Example 1

Vector3 newVector = targetPoint - initialPoint;

Learn ReactJs, React Native from akashmittal.com