Sphere Object
Work In Progress
We are working on updating and improving this documentation. Some information may be missing or inaccurate.
Description
This creates a sphere. By default, the number of divisions is 4, the position is 0, 0, 10, the radius is 10, the edge texture is boxwall, the bottom texture (used for hemispheres) is roof, and tahe texsize is -4.0.
Attributes
| Syntax | Description |
|---|---|
| name <name> |
Sets the name of this object. In many cases, this does not have any purpose and may just be useful for documenting what the object is for. In some case, like for teleporters, this can be used to reference the object from other objects. |
| position <x> <y> <z> |
This controls the absolute position of the object, lined up with the bottom center of the object. The center of the world, at ground level, is 0 0 0. |
| size <x> <y> <z> |
This controls the size of the object. It accepts three floating point numbers for the X, Y, and Z size of the object. Z is up. |
|
rot <angle> rotation <angle> |
Objects can be rotated on the Z axis, with the angle being specified in degrees. Extremely old worlds may use radians and will need to be converted, since BZFlag 1.7e0 used radians, and this was changed to use degrees in BZFlag 1.7e4. |
| shift <x> <y> <z> |
This shifts the relative position of an object. |
| scale <x> <y> <z> |
This scales an object up or down in the x, y, and/or z direction, with 1 being 100%. |
| shear <x> <y> <z> | |
| spin <angle> <x> <y> <z> | |
| xform <transform_name> |
The xform attribute applies the transformations of a transform to an object. You provide the name of the transform object. |
| drivethrough |
This allows tanks to drive through the object. |
| shootthrough |
This allows bullets and beam weapons to pass through the object. |
| passable |
This combines the effects of both the drivethrough and shootthrough attributes. |
| ricochet |
On a server with ricochet disabled, this attribute selectively enables ricochet on this object. |
| divisions <divisions> |
Controls the detail level of the sphere. This defaults to 4. |
| radius <radius> |
This is a shortcut that sets the X, Y, and Z size to the same value. |
|
hemi hemisphere |
This remove the bottom half of the sphere and creates a solid bottom. |
| texsize <float> <float> | |
| phydrv <driver_name> |
Applies a physics driver named as provided, which alter the physics of a tank when they touch the object. Examples of physics drivers are bounce pads, conveyor belts, and death. You provide the name of the physics driver object. |
| smoothbounce | |
| flatshading | |
| matref <material_name> |
The matref attribute applies a material to the object. You provide the name of the material object. |
| resetmat | |
| dyncol <dynamic_color_name> | |
|
ambient <red> <green> <blue> [alpha] ambient <color_name> [alpha] |
|
|
diffuse <red> <green> <blue> [alpha] diffuse <color_name> [alpha] color <red> <green> <blue> [alpha] color <color_name> [alpha] |
|
|
specular <red> <green> <blue> [alpha] specular <color_name> [alpha] |
|
|
emission <red> <green> <blue> [alpha] emission <color_name> [alpha] |
|
| shininess <float> | |
| alphathresh <value> | |
| noculling | |
| nosorting | |
| noradar | |
| noshadow | |
| nolighting | |
| occluder | |
| groupalpha | |
| texture <texture_name> | |
| notextures | |
| addtexture <texture_name> | |
| texmat <matrix_name> | |
| notexalpha | |
| notexcolor | |
| spheremap | |
|
edge <attribute> <value...> bottom <attribute> <value...> |
Syntax Examples
This creates a more detailed sphere elevated from the ground.
sphere
divisions 10
radius 30
position 0 0 80
end
This content is maintained on GitHub. We welcome any feedback and improvements!