You are attempting to use mouselook to angle the camera around, yet you want it to point at the player. You can't have it both ways; either you point at the player, or you allow the user to rotate the camera based upon the mouse movements. The best I think you can do is to allow the player to rotate on the Y axis and have the camera follow from above and behind:
Rem Project: Dark Basic Pro Project
Rem Created: Wednesday, March 02, 2011
Rem ***** Main Source File *****
// LBFN for David iz cool
sync on : sync rate 60
autocam on
color backdrop 0
player = 10
make object box 11,1000,5,1000
position object 11,0.0,-2.5,0.0
color object 11,rgb(0,225,0) : set object ambience 11,rgb(0,225,0)
make object cube player,10
position object player,0.0,5.0,0.0
repeat
gosub MovePlayer
sync
until mouseclick() > 0
delete object player
end
MovePlayer:
MMx = Mousemovex() : MMy = Mousemovey()
OaY# = object angle y(player)
rotate object player,object angle x(player),wrapvalue(OaY# + (MMx * .3)),object angle z(player)
set camera to object orientation player
OposX# = object position x(player) : OposY# = object position y(player) : OposZ# = object position z(player)
if keystate(17) = 1 : // W
OposX# = newXvalue(OposX#,OaY#,2.0)
OposZ# = newZvalue(OposZ#,OaY#,2.0)
position object player, OposX#,OposY#,OposZ#
endif
if keystate(31) = 1 : // S
OposX# = newXvalue(OposX#,CaY#,-2.0)
OposZ# = newZvalue(OposZ#,CaY#,-2.0)
position object player, OposX#,OposY#,OposZ#
endif
position camera OposX#,OposY# + 50,OposZ#
move camera -100
point camera OposX#,OposY#,OposZ#
return
Use the W and S keys to move forward and backward. Use the mouse to rotate the 'player' and the camera around. Click any mouse button to quit.