This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Sphere"

From BZFlagWiki
Jump to: navigation, search
(Editor Support)
(hemi sphere)
Line 10: Line 10:
 
   divisions 4
 
   divisions 4
 
   flatshading
 
   flatshading
 +
  hemisphere
 
   position 0 0 10
 
   position 0 0 10
 
   size 10 10 10
 
   size 10 10 10
Line 28: Line 29:
 
divisions=defines the number of subdivisions (pieces) of the sphere
 
divisions=defines the number of subdivisions (pieces) of the sphere
 
flatshading=enables flat shading, smooth shading is the default
 
flatshading=enables flat shading, smooth shading is the default
 +
hemisphere=only draw the top half of the sphere
 
position=defines the center point of the sphere
 
position=defines the center point of the sphere
 
size=defines the size of the sphere
 
size=defines the size of the sphere

Revision as of 19:07, 16 November 2008

The sphere is a BZW Object that defines a sphere in the game arena.

Code

Sphere Appearance

The code to place a sphere in your map is as follows:

sphere
 name example_sphere
 divisions 4
 flatshading
 hemisphere
 position 0 0 10
 size 10 10 10
 radius 10
 rotation 0
 shift 0 0 0
 scale 0 0 0
 shear 0 0 0
 spin angle nx ny nz
 phydrv example_phydrv
 smoothbounce
 matref example_material
end

Valid properties for a sphere are

name defines the name of the sphere, it is not required, and often unused
divisions defines the number of subdivisions (pieces) of the sphere
flatshading enables flat shading, smooth shading is the default
hemisphere only draw the top half of the sphere
position defines the center point of the sphere
size defines the size of the sphere
radius sets all size values to the same value
rotation defines rotation for the sphere
shift shifts the sphere (repeatable)
scale scales the sphere (repeatable)
shear shears the sphere (repeatable)
spin spins the sphere around vector n (repeatable)
phydrv attaches a physics driver to the sphere
smoothbounce makes ricochets use normals
matref defines a material for the sphere to use


Appearance

By default, the sphere is a perfect sphere, with a red brick texture around the outside. You can, however, make the sphere elongated on one side (just don't use the radius option).

History

The sphere object has been supported since BZFlag 2.0.0. In previous versions of BZFlag, this object will not work.

Editor Support

Editors that support the sphere object include Blender using the BZWTools, Wings3D using the BZW Exporter for Wings3D, and pyBZEdit. BZEdit, BZFed, and IBZEdit do NOT support the sphere.