SphereCast- Distance between two point

Can we use Spherecast for to find distance between two points?
i need to find distance between two points…so that I can make player jump over any obstacle irrespective of any204337-screenshot-2023-01-31-194552.png height

Vector3.Distance(point1, point2)

If it’s 2D, Try Vector2.Distance.
Please “Accept Answer” if it works!

its 2x radius. to spherecast you need radius, so you have that already. But not sure this is a way. It depends how this obstacle is structured.