Raise/lower Gameobject along collision heigt of other object

I’m trying to determine the distance between two colliders through a raycast and reposition one of it.

Hi, in this film raycast is used to find the objects distance above the ground, without mouse.positions.

RaycastHit.point also contains information of the exact point in world space where the ray hitted the collider.

Thank you, that was helpful!