` Get value for camera zooming
function getval()
res as float
oz=-300;oo#=1.7 <<<<<<<<******CHANGE SEMICOLON TO COLON*******
res=(oz-cam.z)*0.0035
cam.value=oo#-res
endfunction
as for the rest, this isn`t ZX81 basic, you can give your variables meaningful names, I am not too sure what you hope to do other than just track the cursor, the code is hard to follow, is it meant to track the cursor from above?
position camera object position x(object_number),0,object position z(object_number)
where object_number is the number of the object you use as the cursor
or does it track it like a security camera would?
point camera object position x(object_number),0,object position z(object_number)
or does it track like a security camera and keep the image zoomed in so it is clearly visible?
point camera object position x(object_number),0,object position z(object_number)
distance_to_object=sqrt(abs(camera position x()-object position x(object_number))^2+abs(camera position y()-object position y(object_number))^2)
set camera fov (1/distance_to_object)*45:rem this is a fudge, can`t recall scalar for this
or does it do it some other way?, cheers.
Mentor.