entitypitch problem

Blitz3D Forums/Blitz3D Programming/entitypitch problem

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I did this:
Graphics3D 800,600,32,1
SetBuffer BackBuffer()
Cls
; ########   SETUP PLACE HOLDERS FOR EULER ANGLES
Dim pit(10) ; PITCH
Dim rol(10) ; ROLL
Dim ya(10) ; YAW
; ########   LOAD THE ACCORDING EULER ANGLES FOR EACH NUMBER 0 - 9
pit(0)=72
pit(1)=39
pit(2)=0
pit(3)=-38
pit(4)=-70
pit(5)=-70
pit(6)=-40
pit(7)=0
pit(8)=37
pit(9)=73

rol(0)=180
rol(1)=-180
rol(2)=180
rol(3)=180
rol(4)=180
rol(5)=0
rol(6)=0
rol(7)=0
rol(8)=0
rol(9)=0

ya(0)=-180
ya(1)=180
ya(2)=-180
ya(3)=-180
ya(4)=-180
ya(5)=0
ya(6)=0
ya(7)=0
ya(8)=0
ya(9)=0
; ########   Create a camera so we can see it
camera=CreateCamera()
PositionEntity camera,19,0,-60
; ########   add some lightage
sun = CreateLight()
PositionEntity sun,835,1456,502
RotateEntity sun,80,0,-900
; ########   Load and position the meshes for the wheels already covered in Ult. Unwrap
mesh=LoadMesh( "wheel1.b3d" )
mesh2=CopyEntity(mesh)
mesh3=CopyEntity (mesh)
PositionEntity mesh,0,0,0
PositionEntity mesh2,11,0,0
PositionEntity mesh3,22,0,0
; ################################################## START OF GAME LOOP
While Not KeyHit(1)

If KeyDown(57)=True Then ; ########   WHACK THE SPACEBAR
euler=euler+1
	RotateEntity mesh,pit(euler),rol(euler),ya(euler)
	RotateEntity mesh2,pit(euler),rol(euler),ya(euler)
	RotateEntity mesh3,pit(euler),rol(euler),ya(euler)
	If euler = 9 Then euler = 0

EndIf

  UpdateWorld()
  RenderWorld()
;Text 0,0,"TrisRendered "+TrisRendered()
Text 0,20,"rotation: "+newe
Text 0,40,"PITCH: "+EntityPitch(mesh)
Text 0,60,"ROLL: "+EntityRoll(mesh)
Text 0,80,"YAW: "+EntityYaw(mesh)

  Flip
Wend
End
Now I have to figure out some way to make it more random... THEN spin and slow down like a real slot machine.
-RZ