Check out example codes for "move to where it facing unity 2d". It will help you in understanding the concepts better.

Code Example 1

transform.up

Learn ReactJs, React Native from akashmittal.com