You can use Limb-command.
` atanfull
` spooky
` use EZ rotate
sync on : sync rate 30 : autocam off
make matrix 1,1000,1000,32,32
make object cone 1,10
rotate object 1,90,0,0
fix object pivot 1
position object 1,500,40,500
set object cull 1,0
make object cube 2,5
` hide object 2
position camera 500,100,400
pitch camera down 30
s#=1
do
m=0
ex#=object angle x(1) : ey#=object angle y(1) : ez#=object angle z(1)
EZro_Set ex#, ey#, ez#
if rightkey() then EZro_LY s#
if leftkey() then EZro_LY -s#
if upkey() then EZro_LX s#
if downkey() then EZro_LX -s#
ex#=EZro_GetX()
ey#=EZro_GetY()
ez#=EZro_GetZ()
rotate object 1,ex#,ey#,ez#
rotate object 2,ex#,ey#,ez#
position object 2,object position x(1),object position y(1),object position z(1)
move object 2,10
ang#=getY(1,2)
text 0,0,"Y :"+str$(ang#)
sync
loop
function getY(o1,o2)
ang#=atanfull(object position x(o2)-object position x(o1),object position z(o2)-object position z(o1))
if ang# < 0 then ang#=ang#+360
endfunction ang#
windowsXp