This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Physics: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Changed parameters to property list
Jftsang (talk | contribs)
No edit summary
Line 15: Line 15:
<properties>
<properties>
name=Name of the physics driver, for reference
name=Name of the physics driver, for reference
linear=Cause a tank to move linearly at the given velocity (x/y/z).
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).
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)
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
death=Causes the tank to die on contact. Player sees the given message
</properties>
</properties>


A physics driver can be called by adding 'phydrv <name>' to an object or mesh face.
A physics driver can be called by adding 'phydrv <name>' to an object, group or mesh face. '''Physics drivers do not work on boxes and pyramids in version 2.0.8'''


== Editor Support ==
== Editor Support ==

Revision as of 22:08, 24 September 2007

Physics, or Physics Driver, can be applied to any 2.0 object, for example a mesh or meshbox. It will affect a tank touching it in some way.

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: <properties> 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 </properties>

A physics driver can be called by adding 'phydrv <name>' to an object, group or mesh face. Physics drivers do not work on boxes and pyramids in version 2.0.8

Editor Support

There are currently no supported editors: physics drivers will need to be added by hand in a text editor.

History

The Physics object was added with the v2.0.0 release of BZFlag.