Filename$ - Name of the file containing the model to load.
Parent (optional) - Specify an entity to act as a Parent to the loaded mesh.
LoadMesh, as the name suggests, Loads a mesh from an .X, .3DS or .B3D file (Usually created in advance by one of a number of 3D model creation packages) and returns the mesh handle.
Any hierarchy and animation information in the file will be ignored. Use LoadAnimMesh to maintain hierarchy and animation information.
The optional parent parameter allows you to specify a parent entity for the mesh so that when the parent is moved the child mesh will move with it. However, this relationship is one way; applying movement commands to the child will not affect the parent.
Specifying a parent entity will still result in the mesh being created at position 0,0,0 rather than at the parent entity's position.
See also: LoadAnimMesh
; LoadMesh Example
; Load mesh
While Not KeyDown( 1 )
|yazzgoth||(Posted 1+ years ago)|
| MAV: Entity does not exist!|
line: PositionEntity drum,0,0,MeshDepth(drum)*2
|degac||(Posted 1+ years ago)|
| ehm....you need a valid .3ds file (in this case) placed in the directory media/oil-drum/.... |
|Ben(t)||(Posted 1+ years ago)|
| I can't get .b3d files to load blitz3d only seems to load .x .3ds and .md2 |
|thelizardking||(Posted 1+ years ago)|
| ben(t): thatz because u have an old version of b3d. just update, cause i had the same problem and then i updated, and, viola! it worked. just a bug i ges |
|Rob Farley||(Posted 1+ years ago)|
| Not a bug, b3d format was implemented in v1.75, it didn't exist beforehand. |
Blitz3D Manual ForumBlitzPlus Equivalent Command
|Beaker||(Posted 1+ years ago)|
| LoadMesh requires texture files (PNG/BMP/JPG) to be in the same folder as the B3D/X/3DS files that require them. |