my fisrt project

Blitz3D Forums/Blitz3D Beginners Area/my fisrt project

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.

After feeling of ripping my hair out I figured it out and wrote like this

;Name of application
AppTitle "My First Terrain And First animated Character"

;*******************
;GRAPHICS
;*******************

Graphics3D 800,600

SetBuffer BackBuffer()

Camera=CreateCamera()

PositionEntity camera,30,1,-3,True

Light=CreateLight()

RotateEntity Light,90,0,0

terrain=CreateTerrain(512)

Grass=LoadTexture("texture.jpg")
EntityTexture terrain,Grass

box=LoadAnimMesh("model\BOX.B3D")

ScaleEntity box,.1,.1,.1

TranslateEntity box,30,0,-.51

SetAnimKey box,15,True,True,True

AddAnimSeq(box,15)

Animate box

While Not KeyHit(88)

;this moves and turn's the box around player=CreatePivot()
player=CreatePivot()
EntityParent(camera,box,1)


If KeyDown( 32 )=True Then TurnEntity camera,0,-.0,0
If KeyDown( 30 )=True Then TurnEntity camera,0,.0,0
If KeyDown( 31 )=True Then MoveEntity camera,0,0,-0.00
If KeyDown( 17 )=True Then MoveEntity camera,0,0,0.00


If KeyDown( 32 )=True Then TurnEntity box,0,-1,0
If KeyDown( 30 )=True Then TurnEntity box,0,1,0
If KeyDown( 31 )=True Then MoveEntity box,0,0,-0.05
If KeyDown( 17 )=True Then MoveEntity box,0,0,0.05


UpdateWorld
RenderWorld

Flip

Wend

End