Difference between revisions of "Physics"

From BZFlagWiki
Jump to: navigation, search
m (Added Categories)
m (spelling and formatting)
Line 2: Line 2:
  
 
== Code ==
 
== Code ==
 +
{|
 +
|
 
  physics  
 
  physics  
   name example_phydrv      # Name of the physics driver, for referance.
+
   name example_phydrv      # Name of the physics driver, for reference.
 
   linear 0.0 0.0 0.0      # x/y/z linear velocities  
 
   linear 0.0 0.0 0.0      # x/y/z linear velocities  
 
   angular 0.0 0.0 0.0      # Rotation freq, x/y coordinates  
 
   angular 0.0 0.0 0.0      # Rotation freq, x/y coordinates  
Line 9: Line 11:
 
   death Message goes here. # Player dies when he touches the physics driver  
 
   death Message goes here. # Player dies when he touches the physics driver  
 
  end
 
  end
 
+
|}
 
The valid parameters for physics are:
 
The valid parameters for physics are:
  
Line 26: Line 28:
  
 
== Editor Support ==
 
== Editor Support ==
There are currently no supported editors: physics drvers will need to be added by hand in a text editor.
+
There are currently no supported editors: physics drivers will need to be added by hand in a text editor.
  
 
==History==
 
==History==

Revision as of 12:50, 11 March 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      # Name of the physics driver, for reference.
  linear 0.0 0.0 0.0       # x/y/z linear velocities 
  angular 0.0 0.0 0.0      # Rotation freq, x/y coordinates 
  slide 0.0                # Time until max velocity (> 0.0 enables) 
  death Message goes here. # Player dies when he touches the physics driver 
end

The valid parameters for physics are:

name: Name of the physics driver

linear: Cause a tank to move linearly at the given velocity.

angular: Cause a tank to rotate at the given velocity.

slide: Cause the tank to accelerate slowly during the time given. (i.e. Makes a 'slippery' surface.)

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 or mesh face.

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.