Check out example codes for "how to make an object go to a posin in unity". It will help you in understanding the concepts better.

Code Example 1

float secondX; float secondy; float secondz; Vector3 firstPosition = new Vector3(transform.position.x, transform.position.y, transform.position.z); Vector3 secondPosition = new Vecotr3(whatever, whatever, whatever); while(transform.position.x < secondX) {   transform.position = new Vecotr3(transform.position.x + 0.001f, transform.position.y, trnasform.position.z); }

Learn ReactJs, React Native from