This wiki is archived and useful information is being migrated to the main bzflag.org website
Meshbox
The meshbox is the 2.0 update to the original box object in BZFlag 1.0. The main difference between the box and the Meshbox is that the meshbox supports new features in BZFlag 2.0, such as physics drivers and textures.
Contents
Code
A very basic meshbox will include:
meshbox position 0 0 0 # x-pos, y-pos, height rotation 0 # rotation in degrees size 10 10 10 # x-len, y-len, height end |
As with the box object, position defines where the meshbox should be located. Rotation defines the angle it should be rotated to (about the Z-axis), and size defines how big or small the object should be. Now, if you're looking for something a little fancier, you can try code similar to this:
meshbox position 0 0 0 rotation 0 size 10 10 10 outside matref my_cool_wall top matref my_cool_roof phydrv example_physics obstacle end |
So what's the difference here? Well, this object will be treated as an obstacle. The outside walls (as opposed to inside, top, or bottom) will appear with the "my_cool_wall" material, and the roof (top) will have "my_cool_roof." Of course, if you want a material on all sides of the object, you can simply omit the "top" specification at the start of the line, and simply have: "matref my_cool_material." Also, you can specify a physics driver to the object, to influence tank behavior a bit.
Appearance
By default, a meshbox will have red brick walls, and a grey stone roof. However, if a material is specified by the map creator, the appearance depends on the designer's choosing.
History
The meshbox was added in BZFlag 2.0.0.
Editor Support
The meshbox IS supported by iBZEdit, pyBZEdit, Blender with the BZWTools plugin, and the BZW Exporter for Wings3D. The meshbox is NOT supported by BZEdit or BZFed.