if you want to be able to orbit around the payer, I take it you want to do that with the mouseXSpeed, right?
you may use sin/cos to position your camera, somethng like:
This is of course only a very basic skeleton. For a good camera handling you should smooth things, using rubberband alignement, and probably AlignToVector for smooth rotation.
Additionally you may need an obstacles handler, this is going to make your zoom routine more complex.
you may use sin/cos to position your camera, somethng like:
dis#=15 while keydown(1)=0 ; main loop ; do things... ; orbit code x#=entityx(player) y#=entityy(player) z#=entityz(player) positionentity camera,x+(sin(a)*dis),y+5,z+(cos(a)*dis) pointentity camera,player rotateentity camera, entitypitch(camera),entityyaw(camera),0 renderworld() flip ; handle mouse orbit movemouse graphicswidth()/2,graphicsheight()/2 a=a+ mousexspeed() if a<0 then a=a+360 if a>360 then a=a-360 dis=dis+mousezspeed() ; mousewheel to zoom if dis<5 then dis=5 if dis >25 then dis=25 wend
This is of course only a very basic skeleton. For a good camera handling you should smooth things, using rubberband alignement, and probably AlignToVector for smooth rotation.
Additionally you may need an obstacles handler, this is going to make your zoom routine more complex.