; CreateCamera Example ; -------------------- Graphics3D 640,480,0,2 SetBuffer BackBuffer() ; Create the camera - the scene is rendered from its point of view camera=CreateCamera() PositionEntity camera,0,1,-5 light=CreateLight() RotateEntity light,45,45,0 ; A spinning cone to look at cone=CreateCone(16) PositionEntity cone,0,1,0 EntityColor cone,255,100,0 While Not KeyDown(1) TurnEntity cone,0,1,0 ; A camera is a normal entity, so entity commands move and turn it If KeyDown(200) Then MoveEntity camera,0,0,0.1 If KeyDown(208) Then MoveEntity camera,0,0,-0.1 If KeyDown(203) Then TurnEntity camera,0,1,0 If KeyDown(205) Then TurnEntity camera,0,-1,0 RenderWorld Text 0,0,"Arrow keys: move camera Esc: exit" Text 0,20,"The view is rendered through the camera returned by CreateCamera()" Flip Wend End