I don't have the source right here (new machine).
-Get X and Z from the main camera.
-Do a linepick from the main cameras position against the ground.
-Calculate main camera Y minus pickedY.
-Calculate pickedY minus the prev. calculations result, to get the Cube cam Y.
Now position the cube cam at this X,cubeY,Z and perform a 6 sided render for cubemapping as seen eg. in the cubed-Markio Demo.
.game cam
______________________ground
_______/
_/ °cube cam
-------------------- Zero
You see the distance from game cam to the ground is the same as from cube cam to the ground, only the cube cam is on the other side. Sorry if I explained it complicated :)
EDIT: btw. I'd also reccomend to use an optimzed cube-rendering function as seen in the code archives, that will use multiple cameras with side by side organized viewports to render all 6 sides with a single renderworld.