I've been working on an editor and want to make it so when i click my middle mouse button it repositions where the camera points too... i thought my code should work, but it will only allow my camera to go one way, and the cameras rotation amount seems to decrease with every time i push my middle mouse button... any ideas???
sync on : sync rate 60
global camxP = 0
global camyP = 0
global camzP = 0
set window on
load dll "user32.dll",1
swidth=call dll(1,"GetSystemMetrics",0)
sheight=call dll(1,"GetSystemMetrics",1)
Set Display Mode swidth, sheight, 32
delete dll 1
maximize window
set window layout 3,1,1
autocam off
Position camera 0, 50,50, -60
point camera 0,camxP, camyP, camZp
set camera view 0,0,25,swidth/1.3,(sheight/1.3)+25
color backdrop 0, RGB(0,0,255)
INK RGB(255,255,255),0
MAKE OBJECT CUBE 1, 50
SET OBJECT WIREFRAME 1,1
SET OBJECT CULL 1, 0
do
testCubeControl()
camControl()
sync
loop
function TESTCUBECONTROL()
if upkey() = 1 then pitch object up 1,1
if downkey() = 1 then pitch object down 1,1
if Rightkey() = 1 then turn object right 1,1
if leftkey() = 1 then turn object left 1,1
endfunction
function CAMCONTROL()
if MOUSECLICK() = 4
if mousemoveX() < 0
camxP = camxP -1
endif
if mousemoveX() > 0
camxP = camxP + 1
endif
if mousemovey() < 0
camyP = camyP - 1
endif
if mousemovey() >0
camyp = camyP + 1
endif
if mousemovez()< 0
camzP = camzP -1
endif
if mousemoveZ() > 0
camzP = camzP+1
endif
point camera 0, camxP,camyP,camzP
endif
endfunction
so what am i doin wrong ladies and gentlemen???