This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Box"
m (→Appearance) |
(Notes to different appearance, maybe this needs to go in a different page and linked to it but I'm not sure.) |
||
Line 23: | Line 23: | ||
==Appearance== | ==Appearance== | ||
Box objects by default have a red brick texture on the vertical sides, and a white plaster texture on the top and bottom. A box of height 0 on ground level ''is'' visible. | Box objects by default have a red brick texture on the vertical sides, and a white plaster texture on the top and bottom. A box of height 0 on ground level ''is'' visible. | ||
+ | |||
+ | The texsizes of boxe and boxes made of meshes (e.g. meshbox and box with one of the new properties) are different. | ||
+ | |||
+ | {| | ||
+ | |+ | ||
+ | |- texsize | ||
+ | |- Old style boxes | ||
+ | |- -2.0f -2.0f -8.0f -8.0f | ||
+ | |} | ||
+ | |||
+ | {|{{Prettytable}} | ||
+ | |- | ||
+ | | {{Hl3}} |'''Box type''' | ||
+ | | {{Hl3}} |'''texsize''' | ||
+ | |- | ||
+ | |box (old style box) | ||
+ | | -2.0f -2.0f -8.0f -8.0f | ||
+ | |- | ||
+ | |meshbox | ||
+ | | -8.0f -8.0f -8.0f -8.0f | ||
+ | |- | ||
+ | |box with one meshbox property | ||
+ | | -8.0f -8.0f -8.0f -8.0f | ||
+ | |} | ||
+ | |||
+ | This will cause the textures to scale differently in X and Z axis. Same values will cause textures in Y axis (vertical axis) to scale the same way. | ||
==History== | ==History== |
Revision as of 07:36, 9 July 2007
A Box is a BZW map structure that defines a rectilinear parellepiped in the world.
Contents
Code
The code for a box object is as follows
box position 10 20 30 rotation 45 size 1 2 3 end |
Valid parameters for a box are
position | defines the center of the box in X and Y and the bottom of the box in Z. |
rotation | defines a rotation around the Z axis for the box, in degrees. |
size | defines the distance from the center to the side of the box in X and Y, and the total height of the box in Z. |
Boxes do not support Material, Texture Matrix, or Physics Drivers. The Meshbox object replaces the box object and supports these features.
Appearance
Box objects by default have a red brick texture on the vertical sides, and a white plaster texture on the top and bottom. A box of height 0 on ground level is visible.
The texsizes of boxe and boxes made of meshes (e.g. meshbox and box with one of the new properties) are different.
Box type | texsize |
box (old style box) | -2.0f -2.0f -8.0f -8.0f |
meshbox | -8.0f -8.0f -8.0f -8.0f |
box with one meshbox property | -8.0f -8.0f -8.0f -8.0f |
This will cause the textures to scale differently in X and Z axis. Same values will cause textures in Y axis (vertical axis) to scale the same way.
History
The box is one of the original objects supported by BZFlag and has been a mainstay of maps since the very beginning. Boxes are heavily used by the software when generating random maps. In v2.0.0 the box was replaced with the meshbox object to support Materials and Physics Drivers. The original box definition was left unchanged, in order to maintain functional compatibility for older maps.
Editor Support
The box object is supported by all known editors.