func_physbox

XashXT

func_physbox

An object that simulates rigid body physics. Can interact with other objects and with the player.

Spawnflags

SF_PHYS_BREAKABLE 128 (make the object breakable)
SF_PHYS_CROWBAR 256 (the object breaks from one crowbar hit regardless of the specified toughness)
SF_PHYS_HOLDABLE 512 (the player can pick the object up, carry it and drop it with the Use key)

Options

material Material, as in func_breakable and func_pushable. Determines the damage sounds, debris type, sparks and so on.
gibmodel Path to the custom debris model in case the object is destroyed.
model Path to the primary physics object model. This can be an mdl or brush model.
health Object toughness.

Usage Details

  • Brush entities cannot be transferred from one level to another, but entities with a regular model are transferable by default.
  • The physics hull of an object is built automatically at game start. However, because the hull is convex and PhysX imposes a limit of 256 independent vertices, the hull can be calculated incorrectly for some objects. XashXT produces a corresponding message in the console if it fails to build a hull. For complex concave objects, an approximated best-fitting convex shape will be generated. To view the physics hull, use the following console command: phys_debug 1.
  • Stable operation of movers (such as lifts, trains and doors) is not guaranteed due to the way collisions are calculated for the HLBSP format, where 4 approximate hulls are used in collision testing. Therefore, you will get the best results from using cube-shaped objects whose sizes match the sizes of the hulls. Hull sizes are described in gameinfo.txt.