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

Difference between revisions of "Cone"

From BZFlagWiki
Jump to: navigation, search
(Code)
(Editor Support: update)
 
(12 intermediate revisions by 9 users not shown)
Line 2: Line 2:
  
 
==Code==
 
==Code==
To place an cone into your map file, the following template is suggested:
+
[[Image:ConePic.png|right|frame|300px|Cone Appearance]]
 +
To place a cone into your map file, the following template is suggested:
 
{|
 
{|
 
|
 
|
Line 19: Line 20:
 
   smoothbounce
 
   smoothbounce
 
   matref material
 
   matref material
 +
  bottom matref material2
 
  end
 
  end
 
|}
 
|}
 
Valid parameters for a cone are:
 
Valid parameters for a cone are:
<properties>
+
{|{{Prettytable}}
name=defines the name of cone, often unused  
+
|-
divisions=defines the number of subdivisions in the cone
+
| {{Hl3}} |'''Parameter'''
flatshading=defines the use of flat shading, smooth is the default
+
| {{Hl3}} |'''Description'''
position=defines the position of the cone in X-pos, Y-pos and the height of the cone in Z.
+
|-
rotation=defines a rotation around the Z axis for the cone, in degrees.
+
| '''name''' || defines the name of cone, often unused.
size=defines the distance from the center to the side of the cone in X and Y, and the total height of the cone in Z.
+
|-
shift=shift the cone (repeatable)
+
| '''divisions''' || defines the number of subdivisions (number of sides) in the cone, a higher value leads to a slower map with more detail.
shear=(repeatable)
+
|-
scale=defines the scale of the cone in x,y, and z, 1 is the default, lower values make it smaller (repeatable)
+
| '''flatshading''' || defines the use of flat shading, smooth is the default.
spin angle=rotate the cone around a vector by angle. The vector <nx, ny, nz> must be a unit vector.  Due to a bug in BZFlag 2.0.8's Z-bufferring, it is advisable to ensure that the cone is rotated up and away from the ground, because it will NOT appear as though the cone was embedded in the ground. (repeatable)
+
|-
phydrv=reference to a predefined [[physics|physics driver]].
+
| '''position''' || defines the position of the cone in X-pos, Y-pos and the height of the cone in Z.
smoothbounce=defines that shot bounces use normals
+
|-
matref=reference to a predefined [[material]].
+
| '''rotation''' || defines a rotation around the Z axis for the cone, in degrees.
</properties>
+
|-
 +
| '''size''' || defines the distance from the center to the side of the cone in X and Y, and the total height of the cone in Z.
 +
|-
 +
| '''shift''' || shift the cone (repeatable).
 +
|-
 +
| '''shear''' || (repeatable).
 +
|-
 +
| '''scale''' || defines the scale of the cone in x,y, and z, 1 is the default, lower values make it smaller (repeatable).
 +
|-
 +
| '''spin angle''' || rotate the cone around a vector by angle. The vector <nx, ny, nz> must be a unit vector.  Because the BZFlag client doesn't clip objects against the ground, it is advisable to ensure that the cone is rotated up and away from the ground. Otherwise, the cone will appear to be super-imposed on the ground, rather than embedded into it. (repeatable).
 +
|-
 +
| '''phydrv''' || reference to a predefined [[physics|physics driver]].
 +
|-
 +
| '''smoothbounce''' || defines that shot bounces use normals.
 +
|-
 +
| '''matref''' || reference to a predefined [[material]].
 +
|-
 +
| '''bottom matref''' || defines a different [[material]] for the bottom surface (optional).
 +
|}
  
 
==Appearance==
 
==Appearance==
Line 45: Line 65:
  
 
==Editor Support==
 
==Editor Support==
Editors that support the cone object include [[Blender]] using the [[BZWTools]], [[Wings3D]] using the [[BZW Exporter for Wings3D]], and [[pyBZEdit]]. [[BZEdit]] and [[BZFed]] do NOT support the cone.
+
Editors that support the cone object include [[Blender]] using the [[BZWTools]], [[Wings3D]], and [[pyBZEdit]]. [[BZEdit]] and [[BZFed]] do NOT support the cone.
  
 
[[Category:Map Making]]
 
[[Category:Map Making]]
 
[[Category:Map_Objects]]
 
[[Category:Map_Objects]]

Latest revision as of 20:57, 2 February 2017

The cone object is a BZW object that defines a cone in the game arena.

Code[edit]

Cone Appearance

To place a cone into your map file, the following template is suggested:

cone
 name example_cone
 divisions 16
 flatshading
 position 0 0 0
 rotation 0
 size 10 10 10
 shift 0 0 0
 shear 0 0 0
 scale 1 1 1
 spin angle nx ny nz
 phydrv physics_driver_name
 smoothbounce
 matref material
 bottom matref material2
end

Valid parameters for a cone are:

Parameter Description
name defines the name of cone, often unused.
divisions defines the number of subdivisions (number of sides) in the cone, a higher value leads to a slower map with more detail.
flatshading defines the use of flat shading, smooth is the default.
position defines the position of the cone in X-pos, Y-pos and the height of the cone in Z.
rotation defines a rotation around the Z axis for the cone, in degrees.
size defines the distance from the center to the side of the cone in X and Y, and the total height of the cone in Z.
shift shift the cone (repeatable).
shear (repeatable).
scale defines the scale of the cone in x,y, and z, 1 is the default, lower values make it smaller (repeatable).
spin angle rotate the cone around a vector by angle. The vector <nx, ny, nz> must be a unit vector. Because the BZFlag client doesn't clip objects against the ground, it is advisable to ensure that the cone is rotated up and away from the ground. Otherwise, the cone will appear to be super-imposed on the ground, rather than embedded into it. (repeatable).
phydrv reference to a predefined physics driver.
smoothbounce defines that shot bounces use normals.
matref reference to a predefined material.
bottom matref defines a different material for the bottom surface (optional).

Appearance[edit]

The cone, by default, has the red brick wall texture on the curved surface, and the grey roof appearance of a normal box on the bottom. However, using matref one can change the appearance of the cone.

History[edit]

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

Editor Support[edit]

Editors that support the cone object include Blender using the BZWTools, Wings3D, and pyBZEdit. BZEdit and BZFed do NOT support the cone.