Publié : lun. 26/mars/2007 18:15
				
				Je me suis inspiré de ma Camera. En faite c'est POSSIBLE.
En voici la preuve :
			En voici la preuve :
Code : Tout sélectionner
; Fichiers Include 
IncludePath "Include\"   :    IncludeFile "dreamotion3d.pbi" 
InitKeyboard() : InitSprite()
; init 3D engine
DM_Graphics3D(600,600, 32,  0, 1)
*meshp = DM_CreateCube()
DM_EntityVisible(*meshp,0)
*mesh = DM_CreateCube(*meshp) 
*camera = DM_CreateCamera()
DM_TranslateEntity(*camera,0,0,-20) 
; light
DM_AmbiantLight(150,  150,  150) 
*light = DM_CreateLight(#D3DLIGHT_POINT,*mesh)
DM_TranslateEntity(*light,0,20,-20) 
DM_RotateEntity(*meshp,50,0,0)
Repeat
       ExamineKeyboard()
       If KeyboardReleased(#PB_Key_Escape) Or WindowEvent()=#PB_Event_CloseWindow 
              Quit=1
       EndIf
       DM_BeginScene()
       DM_RenderWorld()
       DM_TurnEntity(*mesh,0,1,0)
       If KeyboardReleased(#PB_Key_F12)
              DM_ScreenShot()
       EndIf
       	If KeyboardPushed(#PB_Key_Up)
	 	      DM_TurnEntity(*meshp,1,0,0)
        EndIf
        
        If KeyboardPushed(#PB_Key_Down)
	 	      DM_TurnEntity(*meshp,-1,0,0)
        EndIf
       DM_EndScene()
Until Quit=1
DM_ClearGraphics()
End