;up arrow if keydown(200) moveentity camera,0,0,0.2 ;down arrow if keydown(208) moveentity camera,0,0,-0.2 ;left arrow if keydown(203) moveentity camera,0,-0.2,0 ;right arrow if keydown(205) moveentity camera,0,0.2,0
AJ00200
;up arrow if keydown(200) moveentity camera,0,0,0.2 ;down arrow if keydown(208) moveentity camera,0,0,-0.2 ;left arrow if keydown(203) moveentity camera,0,-0.2,0 ;right arrow if keydown(205) moveentity camera,0,0.2,0
;up arrow If KeyDown(200) MoveEntity camera,0,0,0.2 ;down arrow If KeyDown(208) MoveEntity camera,0,0,-0.2 ;left arrow If KeyDown(203) MoveEntity camera,-0.2,0,0 ;right arrow If KeyDown(205) MoveEntity camera,0.2,0,0
function 3DmovementKeys(speed, camera) ;up arrow If KeyDown(200) MoveEntity camera,0,0,speed ;down arrow If KeyDown(208) MoveEntity camera,0,0,-speed ;left arrow If KeyDown(203) MoveEntity camera,-speed,0,0 ;right arrow If KeyDown(205) MoveEntity camera,speed,0,0 end function
Graphics3D 800, 600, 32, 2 AmbientLight 255, 255, 255 Global cam = CreateCamera() PositionEntity cam, 0, 1, -4 CameraRange cam, .1, 100000000 Global sky = CreateSphere(50) EntityColor sky, 68, 207, 252 ScaleEntity sky, 1000000, 1000000, 1000000 FlipMesh sky Global cube = CreateCube() EntityAlpha cube, .5 PositionEntity cube, 0, 1, 0 EntityShininess cube, .5 EntityColor cube, 102, 102, 255 Global land = CreatePlane() EntityColor land, 128, 128, 128 While Not KeyHit(1) PositionEntity sky, EntityX(cam), EntityY(sky), EntityZ(cam) movement(cam, 0.1, 1) UpdateWorld RenderWorld Text 0, 0, EntityX(cam) Text 0, 10, EntityY(cam) Text 0, 20, EntityZ(cam) Text 0, 30, EntityYaw(cam) Flip Wend Function movement(camera, mspeed#, tspeed#) MoveEntity camera, 0, 0, ((KeyDown(200)-KeyDown(208))*mspeed#) TurnEntity camera, 0, ((KeyDown(203)-KeyDown(205))*tspeed#), 0 End Function