Ok, my examples that i gave you were not fully correct, i appologize, here is your code:
` Main loop
Do
` Store Object angle
AngleY# = object angle Y(10)
` Control input for camera
`mouse look
cax#=wrapvalue(cax#+mousemovey()*0.25)
cay#=wrapvalue(cay#+mousemovex()*0.25)
rotate camera cax#,cay#,0
`mouse wheel moves up and down
cy# = cy# + (MouseMoveZ() / 50)
`arrow keys move camera left/right, up down
If LeftKey() = 1 Then cx# = NewXValue(Camera Position X(),WrapValue(Camera Angle Y()-90),5)
If RightKey() = 1 Then cx# = NewXValue(Camera Position X(),WrapValue(Camera Angle Y()+90),5)
If UpKey() = 1 Then cz# = NewZValue(Camera Position Z(),Camera Angle Y(),5)
If DownKey() = 1 Then cz# = NewZValue(Camera Position Z(),Camera Angle Y(),-5)
if returnkey() = 1 then set matrix wireframe on 1
if spacekey() = 1 then set matrix wireframe off 1
` cy# = (Get Ground Height(1,cx#,cz#) + 100)
Position Camera cx#,cy#,cz#
Sync
Loop
Change this to:
` Main loop
Do
` Store Object angle
AngleY# = object angle Y(10)
`Camera Position and angle values
cax# = Camera Angle X()
cay# = Camera Angle Y()
caz# = Camera Angle Z()
cx# = Camera Position X()
cy# = Camera Position Y()
cz# = Camera Position Z()
` Control input for camera
`mouse look
If MouseMoveY() <> 0 Then cax# = wrapvalue(cax# + mousemovey() * 0.25)
If MouseMoveX() <> 0 Then cay# = wrapvalue(cay# + mousemovex() * 0.25)
`mouse wheel moves up and down
If MouseMoveZ() <> 0 Then cy# = cy# + (MouseMoveZ() / 50)
`arrow keys move camera left/right, up down
If LeftKey() = 1
cx# = NewXValue(cx#,WrapValue(cay#-90),5)
cz# = NewZValue(cz#,WrapValue(cay#-90),5)
EndIf
If RightKey() = 1
cx# = NewXValue(cx#,WrapValue(cay#+90),5)
cz# = NewZValue(cz#,WrapValue(cay#+90),5)
EndIf
If UpKey() = 1
cx# = NewXValue(cx#,cay#,5)
cz# = NewZValue(cz#,cay#,5)
EndIf
If DownKey() = 1
cx# = NewXValue(cx#,cay#,-5)
cz# = NewZValue(cz#,cay#,-5)
EndIf
rotate camera cax#,cay#,caz#
Position Camera cx#,cy#,cz#
if returnkey() = 1 then set matrix wireframe on 1
if spacekey() = 1 then set matrix wireframe off 1
Sync
Loop
You will notice that both the x and z values need to be updated for the positioning to work in 3 dimentions, previously, it was only calculating for the x value for the strafing and the x value for the movement, where as it should have been calculating for both values...
Hope I Helped...

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy