noobs & PointEntity

BlitzMax Modules Forums/MiniB3D/noobs & PointEntity

'====================================================== 3D Setup ====	
Graphics3D 1000 , 800 , 32 , 0
'Dither True
AntiAlias True
'====================================================== Light =======
	Local light:TLight = CreateLight(2)
	LightRange light , 200000
	AmbientLight 10,10,10
'====================================================== Camera ======
	Global cam:TCamera = CreateCamera() 
	'CameraFogMode cam,1
	'CameraFogRange cam,0,1000
	'========== CAM =============
	Local camX:Int  =  -1800 	'\___ all'alngolo 45°
	Local camY:Int  =	2500		'/
	Local camZ:Int  =	4150
	Local pitch:Int =	  21
	Local yaw:Int   =	-130
	Local roll:Int  =	   0
	Local zoom:Float  =    1.0
	Local mode:Int  =    1
	Local modeDesc:String = "Perspective"

	Local cam_range:Int = 500000
	
	PositionEntity cam , camX , camY , camZ
	RotateEntity cam , pitch , yaw , roll
	CameraRange cam,1,cam_range
	CameraProjMode cam , mode

	Global moveCamera:Int = 0	  	' this is for the camera movement
	Global camDest:tDest			' this is an object to save the coords for the 
	camDest = New tDest				' camera destination... 


	usrSys.drawSystem(usr.SystemID) 	' this generate the planets, by reading a database

'======================================================= CICLO PRINCIPALE ==============
	
While Not KeyDown(KEY_ESCAPE)		
'	keyReset() 
	
	RenderWorld
	
	Local entityPickata:tEntity = PickedEntity()
	If(entityPickata <> Null) 
		If MouseHit(1) Then
			moveCamera = 1
			camDest.X = EntityX(entityPickata, True)
			camDest.Y = EntityY(entityPickata, True)
			camDest.Z = EntityZ(entityPickata, True)
			camDest.Name = Pianeta[Int(EntityName(entityPickata) )].name
		End If
	End If

	If moveCamera = 1 Then
		If camMover(cam , camDest.X, camDest.Y , camDest.Z, Pianeta[Int(EntityName(entityPickata) )].mesh , 20) = 1 Then MoveCamera = 0
	End If
Wend
End 


ok here is, in short words what the maincode are
the drawSystem have a method that will create the 5 planets