physics

Physics tags characterize the dynamic physics and propulsion of vehicles. They are essentially a collection of spherical mass points. Since vehicles can have both model_collision_geometry and physics, each tag is used in different situations:

Physics tags are created by compiling a JMS with specially-named(how?) markers parented to nodes. The markers become mass points.

Mass points #

Mass points (also known as physics spheres) are spherical volumes with mass and density. They can have various types of friction and may provide powered impulse for flight and driving.

Even though mass points are parented to nodes, they do not move with base, overlay, or aiming animations unlike model_collision_geometry. However, when mass points are parented to nodes they can be used to engage a vehicle's suspension animation (e.g. the Warthog and Scorpion). The animation tag specifies the compression and extension depth. It is unknown if the mass points move with the node in this case.

Structure and fields #

Field Type Comments
radius f32
moment scale Fraction: f32
mass f32
center of mass
Point3D
  • x: f32
  • y: f32
  • z: f32
density f32
gravity scale f32
ground friction f32

A coefficient which modifies the amount of friction applied to the vehicle when colliding with "ground" surfaces, which may just mean any BSP surface which is not a water plane. It is unknown if this also modifies friction on scenery collisions. A typical value from the Warthog is 0.23.

ground depth f32
ground damp fraction Fraction: f32
ground normal k1 f32

Used to determine how steep of a surface the vehicle can climb before its powered mass points no longer have an effect. A typical value is ~0.7, while a value near 1.0 allows vertical climbing assuming sufficient friction.

ground normal k0 f32

This is also used to determine how steep of a surface the vehicle can climb and seems to be some sort of lower range bound for fading out powered mass points. A typical value is ~0.5, with -1.0 allowing vertical wall climbing.

pad(4)
water friction f32
water depth f32
water density f32
pad(4)
air friction Fraction: f32
pad(4)
xx moment f32
yy moment f32
zz moment f32
inertial matrix and inverse Block?
  • Minimum: 2
  • Maximum: 2
  • This field's value may change at build time or have precision errors. It should not be used for exact comparisons between tag data.
Field Type Comments
matrix

Matrix3x3: elements (9): f32

powered mass points Block?
Field Type Comments
name char[32]
flags bitfield(32)
Flag Mask Comments
ground friction 0x1
water friction 0x2
air friction 0x4
water lift 0x8
air lift 0x10
thrust 0x20
antigrav 0x40
antigrav strength f32
antigrav offset f32
antigrav height f32
antigrav damp fraction f32
antigrav normal k1 f32
antigrav normal k0 f32
pad(68)
mass points Block?
Field Type Comments
name char[32]
powered mass point i16
model node i16
flags bitfield(32)
Flag Mask Comments
metallic 0x1
relative mass f32
mass f32
relative density f32
density f32
position
Point3D
  • x: f32
  • y: f32
  • z: f32
forward
Vector3D
  • i: f32
  • j: f32
  • k: f32
up
Vector3D
  • i: f32
  • j: f32
  • k: f32
friction type enum
Option Value Comments
point 0x0
forward 0x1
left 0x2
up 0x3
pad(2)
friction parallel scale f32
friction perpendicular scale f32
radius f32
pad(20)

This information was partially generated using Invader tag definitions.

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)