This is a simple camera code for dark basic pro that i made. It lets you look around with an FPS camera. You cannot move,just look around.
rem Make a simple scene for the camera to look at
make matrix 1,10000.0,10000.0,25,25
randomize matrix 1,50.0
set matrix height 1,12,12,300.0
update matrix 1
rem Set variables for character position
cx#=2500
cz#=2500
rem Activate manual sync
sync on
hide mouse
rem Begin loop
do
set cursor 0,0
print "mcy#=",mcy#
print "mcx#=",mcx#
print "Camera Angle Y=",camera angle y()
rem Use MOUSEMOVE to alter camera angles
mcx#=wrapvalue(mcx#+mousemovey()*.5)
mcy#=wrapvalue(mcy#+mousemovex()*.5)
rotate camera mcx#,mcy#,0
rem Position camera to the ground height
cy#=get ground height(1,cx#,cz#)+100.0
position camera cx#,cy#,cz#
rem Syncronise
sync
rem End loop
loop
gm07