Check out example codes for "move in the direction that player is facing unity". It will help you in understanding the concepts better.

Code Example 1

float movementSpeed = 100f;

void Update()
{
	rb.GetComponent<Rigidbody>().velocity = transform.forward * Time.deltaTime * movementSpeed;
}

Learn ReactJs, React Native from akashmittal.com