This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Physics"
From BZFlagWiki
Line 32: | Line 32: | ||
== Editor Support == | == Editor Support == | ||
− | + | It is supported by the BZWTools for Blender. | |
==History== | ==History== |
Revision as of 22:19, 25 November 2007
Physics, or Physics Driver, when applied to an object, will affect a tank touching it in some way. Physics can be applied to any 2.0 object, namely: mesh, meshbox,meshpyr,sphere,cone,tetra, and arc. Similar to materials, they can not be applied to the box or pyramid objects unless the server (BZFS) is version 2.0.9 or later.
Code
physics name example_phydrv linear 0.0 0.0 0.0 angular 0.0 0.0 0.0 slide 0.0 death Message goes here. end |
The valid parameters for physics are:
name | Name of the physics driver, for reference |
linear | Cause a tank to move linearly at the given velocity (x/y/z). For example linear 5 0 0 would cause any tanks on the object to move at a velocity of 5 towards X+ (the side of the map with the highest value of X). |
angular | Cause a tank to rotate at the given velocity,(Rotation velocity, x/y coordinates of the centre). |
slide | Cause the tank to accelerate slowly during the time given. (i.e. Makes a 'slippery' surface.)(Time until max velocity (> 0.0 enables) |
death | Causes the tank to die on contact. Player sees the given message |
A physics driver can be called by adding 'phydrv <name>' to an object, group or mesh face, like so:
meshbox position 0 0 10 size 10 10 5 phydrv example_phydrv end |
Editor Support
It is supported by the BZWTools for Blender.
History
The Physics object was added with the v2.0.0 release of BZFlag.