Help Wanted

newbie2blitz3d – homer

homer

Member

Posts: 106
From: sydney,nsw,australia
Registered: 07-22-2002
hi, im new to blitz 3d and have a problem.....im just messing with it trying to rotate my model bmw thats fine...but when i try to put a terrain under the car i get no errors even in debug mode but no terrain either heres my code any help will be appreciated thanks

Graphics3D 800,600,32,1
SetBuffer BackBuffer()

camera=CreateCamera()

light=CreateLight(2)


RotateEntity light,90,0,0

terrain=CreateTerrain(128)
grass_tex=LoadTexture( "dirtandgrass.jpg" )
EntityTexture terrain,grass_tex

beemer=LoadMesh("bmw.3ds")


PositionEntity beemer,0,0,MeshDepth(beemer)*1

While Not KeyDown( 1 )
pitch#=0
yaw#=0
roll#=0


If KeyDown( 208 )=True Then pitch#=-1
If KeyDown( 200 )=True Then pitch#=1
If KeyDown( 203 )=True Then yaw#=-1
If KeyDown( 205 )=True Then yaw#=1
If KeyDown( 45 )=True Then roll#=-1
If KeyDown( 44 )=True Then roll#=1

TurnEntity beemer,pitch#,yaw#,roll#


RenderWorld
Flip
Wend

End

------------------
HoMaH
-----
peaCe

Robokid2002

Junior Member

Posts: 6
From:
Registered: 11-22-2002
Try using loadterrain(image$) and load a bump map instead of making a flat terrain, that just might fix your problem cause the camera may be placed at the same level of the terrain, and that makes it dissapear, try putting a positionentity camera,0,0,10 after the camera=createcamera() statement. Hope this helps...

Robokid

EDIT: sorry, put positionentity camera,0,10,0 moving it on the z plane would do nothing.

------------------
...Let your spirit fly

[This message has been edited by robokid2002 (edited November 22, 2002).]

Robokid2002

Junior Member

Posts: 6
From:
Registered: 11-22-2002
ypu that was the problem i did a test:

here is my code (i took the model and the texture out cause i didn't want was to lazy to get one to try with your code)


Graphics3D 800,600,32,1
SetBuffer BackBuffer()
camera=CreateCamera()
PositionEntity camera,0,10,0
light=CreateLight(2)

RotateEntity light,90,0,0
terrain=CreateTerrain(128)

While Not KeyDown( 1 )
pitch#=0
yaw#=0
roll#=0

If KeyDown( 208 )=True Then pitch#=-1
If KeyDown( 200 )=True Then pitch#=1
If KeyDown( 203 )=True Then yaw#=-1
If KeyDown( 205 )=True Then yaw#=1
If KeyDown( 45 )=True Then roll#=-1
If KeyDown( 44 )=True Then roll#=1
TurnEntity camera,pitch#,yaw#,roll#

UpdateWorld
RenderWorld
Flip
Wend
End

im not sure what your using this for, but the terrain would look alot better if it had some hills or something. here is a height map you can use... http://members.shaw.ca/loehr4/hmap.jpg just use loadterrain(image$) then scale it (scaleentity entity,x,y,z i think) to get the right size for hte bumps and stuff. Hope this helps.

------------------
...Let your spirit fly

[This message has been edited by robokid2002 (edited November 22, 2002).]