ray casting and coordinates

I m working in an interaction of ray casting: the viewer and a cube. When the viewer is looking at the position of the cube I would like to read the coordinates (the position of the cube).

When can I do?

Thank you very much!

The RaycastHit object returned by the raycast call contains a reference to the transform of the object that was hit. You can get the position of the object from there.