; PositionEntity Example ; ---------------------- Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,0,-10 light=CreateLight() RotateEntity light,45,45,0 ; A beacon placed by absolute coordinates beacon=CreateSphere(16) ScaleEntity beacon,0.5,0.5,0.5 EntityColor beacon,255,60,60 x#=0 y#=0 z#=0 While Not KeyDown(1) ; Cursor keys and A/Z adjust the target coordinates If KeyDown(203) Then x=x-0.1 If KeyDown(205) Then x=x+0.1 If KeyDown(208) Then y=y-0.1 If KeyDown(200) Then y=y+0.1 If KeyDown(44) Then z=z-0.1 If KeyDown(30) Then z=z+0.1 ; PositionEntity places the beacon at an ABSOLUTE point in world space. ; Compare MoveEntity (relative, local axes) and TranslateEntity ; (relative, world axes). PositionEntity beacon,x,y,z RenderWorld Text 0,0,"Cursors/A/Z: change coordinates Esc: exit" Text 0,20,"PositionEntity beacon,"+x+","+y+","+z Flip Wend End