Check out example codes for "unity get velocity of gameobject". It will help you in understanding the concepts better.

Code Example 1

Rigidbody rb = GetComponent<Rigidbody>();
rb.velocity; // Velocity of gameObject (Vector3)

Learn ReactJs, React Native from akashmittal.com