; dxMoveEntity Example ; ------------------ dxGraphics3D 640,480 dxSetBuffer dxBackBuffer() camera=dxCreateCamera() light=dxCreateLight() cone=dxCreateCone( 32 ) ; Move cone in front of camera, so we can see it to begin with dxMoveEntity cone,0,0,10 While Not dxKeyDown( 1 ) ; Reset movement values - otherwise, the cone will not stop! x#=0 y#=0 z#=0 ; Change rotation values depending on the key pressed If dxKeyDown( 203 )=True Then x#=-0.1 If dxKeyDown( 205 )=True Then x#=0.1 If dxKeyDown( 208 )=True Then y#=-0.1 If dxKeyDown( 200 )=True Then y#=0.1 If dxKeyDown( 44 )=True Then z#=-0.1 If dxKeyDown( 30 )=True Then z#=0.1 ; Move cone using movement values dxMoveEntity cone,x#,y#,z# ; If spacebar pressed then rotate cone by random amount If dxKeyHit( 57 )=True Then dxRotateEntity cone,dxRnd( 0,360 ),dxRnd( 0,360 ),dxRnd( 0,360 ) dxRenderWorld dxText 0,0,"Use cursor/A/Z keys to move cone, spacebar to rotate cone by random amount" dxText 0,20,"X Movement: "+x# dxText 0,40,"Y Movement: "+y# dxText 0,60,"Z Movement: "+z# dxFlip Wend End