unity get velocity from a to b code example
Example: unity get velocity at point
Rigidbody rb = gameObject.GetComponent<Rigidbody>();
//Returns the velocity at local position 'pos'
rb.GetPointVelocity(transform.TransformPoint(pos));
Rigidbody rb = gameObject.GetComponent<Rigidbody>();
//Returns the velocity at local position 'pos'
rb.GetPointVelocity(transform.TransformPoint(pos));