Check out example codes for "unity face direction of movement". It will help you in understanding the concepts better.

Code Example 1

transform.rotation = Quaternion.LookRotation(dir);

Learn ReactJs, React Native from akashmittal.com