tokamak physics thread 4

Blitz3D Forums/Blitz3D Programming/tokamak physics thread 4

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.

As far as how materials work in my terrain mesh stuff, I decided it was easiest to assign by texture, so areas that looked like dirt would have some different properties than grass areas. Of course, its not foolproof. You can also set the material of a particular mesh or a default material for a particular mesh in the case that there is no material for a texture.

Const GroundMat = 0
Const WallMat = 1
toksim_SetMaterial GroundMat,0.8,0.01 
toksim_SetMaterial WallMat,0.2,0.8

TOK_SetTextureMaterial("Ground.jpg",GroundMat)
TOK_SetTextureMaterial("Wall1.png",WallMat)
TOK_SetTextureMaterial("Wall2.png",WallMat)

TOK_AddMesh LoadMesh("Level.3ds")
TOK_SetMesh