or use pick screen (only in DBP I believe)
if you have dbp, then I think it would be the fastest and easiest way.
autocam off
sync on
sync rate 60
hide mouse
make object cube 1,10
position camera 0,0,-30
do
sync
free_flight(0,1)
pick screen screen width()/2,screen height()/2,1
text 0,0,"Point 1 space infront of camera:"
text 0,20,"X pos: "+str$(get pick vector x()-camera position x())
text 0,40,"Y pos: "+str$(get pick vector y()-camera position y())
text 0,60,"Z pos: "+str$(get pick vector z()-camera position z())
loop
function free_flight(cam,speed#)
move camera cam,speed#*(upkey()-downkey())
x#=camera angle x(cam)
rotate camera cam,0,camera angle y(cam)+90,0
move camera cam,speed#*(rightkey()-leftkey())
rotate camera cam,x#+mousemovey()/2.0,camera angle y(cam)-90+mousemovex()/2.0,0
if camera angle x(cam)>90 then xrotate camera cam,90
if camera angle x(cam)<-90 then xrotate camera cam,-90
endfunction