Skip to content

func_physbox

Entity I/O / func_physbox

A brush entity that's physically simulated.

  • FGD @SolidClass in game/core/base.fgd, bases BreakableBrush, Targetname, RenderFields, Shadow, BasePhysicsSimulated.
  • cs_script type: BaseModelEntity, what FindEntitiesByClass("func_physbox") returns.
  • Native class: CPhysBox (curated pairing).

CS2 build 27045800 · Steam date 2026-11-30 · platform windows-x86_64 · schema format 2.2

Inputs (41)

NameParameterFromDescription
RunScriptFilestringVScriptLoad and execute a script file
RunScriptCodestringVScriptExecute a fragment of script code
CallScriptFunctionstringVScriptCall a script function
CallPrivateScriptFunctionstringVScriptCalls a script function from this entity's private script scope.
CallGlobalScriptFunctionstringVScriptCalls a script function in the global script scope.
KillGameEntityRemoves this entity from the world.
KillHierarchyGameEntityRemoves this entity and all its children from the world.
KillConstrainedGameEntityRemoves this entity, all its children, and anything constrained to it, from the world.
AddOutputstringGameEntityAdds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care.
FireUser1GameEntityCauses this entity's OnUser1 output to be fired.
FireUser2GameEntityCauses this entity's OnUser2 output to be fired.
FireUser3GameEntityCauses this entity's OnUser3 output to be fired.
FireUser4GameEntityCauses this entity's OnUser4 output to be fired.
EnableAutoSleepingGameEntityEnable automatic sleeping on this entity's physics bodies. When enabled, physics bodies go to sleep when at rest.
DisableAutoSleepingGameEntityDisable automatic sleeping on this entity's physics bodies. Bodies remain awake until explicitly put to sleep.
SetDamageFilterstringDamageFilterSets the entity to use as damage filter. Pass in an empty string to clear the damage filter.
DisableShadowShadowTurn shadow off.
EnableShadowShadowTurn shadow on.
BreakBreakableBreaks the breakable.
SetEnableBreakingbooleanBreakableSets whether or not the breakable can break.
SetEnableCollisionsbooleanBreakableSets whether or not the breakable has collision at all.
SetHealthintegerBreakableSets a new value for the breakable's health. If the breakable's health reaches zero it will break.
AddHealthintegerBreakableAdds health to the breakable. If the breakable's health reaches zero it will break.
RemoveHealthintegerBreakableRemoves health from the breakable. If the breakable's health reaches zero it will break.
SetMassfloatBreakableSet mass of this object.
SetParentapiParentname
SetParentWithOffsetapiParentname
SetParentMaintainOffsetapiParentname
SetParentAttachmentstringParentnameChange this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
SetParentAttachmentMaintainOffsetstringParentnameChange this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.
ClearParentParentnameRemoves this entity from the the movement hierarchy, leaving it free to move independently.
FollowEntitystringParentnameBone merges this entity to a parent entity. Call again passing nothing to end the bone merge.
EnableDamageForcesBreakableBrushDamaging the entity applies physics forces to it.
DisableDamageForcesBreakableBrushDamaging the entity does *not* apply physics forces to it.
AlphaintegerRenderFieldsSet the sprite's alpha (0 - 255).
Colorcolor255RenderFieldsSet the sprite's color (R G B).
WakeWake up this physics object, if it is sleeping.
SleepPut this physics object to sleep. It will wake if given the Wake input, or if force is applied to it. Note that physics objects go to sleep automatically after coming to rest for a while, so you don't really need to use this.
EnableMotionEnable physics motion/collision response.
DisableMotionDisable physics motion/collision response.
ForceDropIf this object is being carried by a player, with the physgun or +USE, force it to be dropped.

Outputs (13)

NameParameterFromDescription
OnUser1GameEntityFired in response to FireUser1 input.
OnUser2GameEntityFired in response to FireUser2 input.
OnUser3GameEntityFired in response to FireUser3 input.
OnUser4GameEntityFired in response to FireUser4 input.
OnKilledGameEntityFired when the entity is killed and removed from the game. Parameter is the inflictor.
OnStartDeathBreakableFired when this prop has begun dying (breaking) before other death-related callbacks.
OnBreakBreakableFired when this breakable breaks.
OnHealthChangedfloatBreakableFired when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].
OnDamagedFired when this entity is damaged.
OnAwakenedFired when this entity becomes awake (collision/force is applied).
OnMotionEnabledFired when motion is enabled due to damage/physcannon/force.
OnPlayerUseFired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set.
OnStartTouchFired when it touches with another entity. Activator is the other entity.

Keyvalues (55)

The names Hammer saves and the KeyValue input and AddOutput take at run time. An entity reads some keys only when it spawns, so changing one later may do nothing. Integer keys such as movetype take engine numbers, not the renumbered cs_script enum values.

KeyTypeDefaultFromDescription
vscripts
Entity Scripts
scriptlistVScriptName(s) of script files that are executed after all entities have spawned.
targetname
Name
target_sourceTargetnameThe name that other entities refer to this entity by.
damagefilter
Damage Filter
target_destinationDamageFilterName of the filter entity that controls which entities can damage us.
disableshadows
Cast Shadows
intchoices0ShadowUsed to disable shadow casting from this entity.
  • 0 Enabled
  • 1 No Shadows
  • 2 Only Realtime Shadows
  • 3 Only Baked Shadows
ExplodeDamage
Explosion Damage
float0BreakableIf non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also 'Explosion Radius'.
ExplodeRadius
Explosion Radius
float0BreakableIf non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also 'Explosion Damage'.
PerformanceMode
Performance Mode
choicesPM_NORMALBreakableUsed to limit the amount of gibs produced when this entity breaks, for performance reasons.
  • PM_NORMAL Normal
  • PM_NO_GIBS No Gibs
NoInterpolate
Disable Client-Side Interpolation
boolean0Breakable
parentname
Parent
target_destinationParentnameThe name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
parentAttachmentName
Parent Bone/Attachment Name
parentAttachmentParentnameThe name of the bone or attachment to attach to on the entity's parent in the movement hierarchy. Use !bonemerge to use bone-merge style attachment. NOTE: If this is specified the Hammer transform will be disregarded, even if 'Use Local Transform' is NOT specified (in that case local transform will be identity)
useLocalOffset
Use Local Transform
boolean0ParentnameWhether to respect the specified local offset when doing the initial hierarchical attachment to its parent.
local.origin
Local Origin
vectorParentnameOffset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
local.angles
Local Angles
angleParentnameAngular offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
local.scales
Local Scale
vector1 1 1ParentnameScale in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
globalname
Global Entity Name
stringGlobalName by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
spawnflagsflags
  • 1 Only Break on Trigger
  • 2 Break on Touch
  • 4 Break on Pressure
  • 512 Break immediately on Physics
  • 1024 Don't take physics damage
  • 2048 Don't allow bullet penetration
  • 4096 Don't allow hand physics damage
  • 16777216 Force nav-ignore
  • 16384 Debris - Don't collide with the player or other debris
  • 32768 Motion Disabled
  • 1048576 Start Asleep
  • 8388608 Prevent motion enable on player bump
propdata
Prop Data
intchoices0BreakableBrushSet to the best approximation of the size and material of this entity's brushes. If set, it will override this entity's health and damage taken from various weapons. See the propdata.txt file in the scripts directory of your MOD to get a detailed list of what each entry specifies.
  • 0 None
  • 1 Wooden.Tiny
  • 2 Wooden.Small
  • 3 Wooden.Medium
  • 4 Wooden.Large
  • 5 Wooden.Huge
  • 6 Metal.Small
  • 7 Metal.Medium
  • 8 Metal.Large
  • 9 Cardboard.Small
  • 10 Cardboard.Medium
  • 11 Cardboard.Large
  • 12 Stone.Small
  • 13 Stone.Medium
  • 14 Stone.Large
  • 15 Stone.Huge
  • 16 Glass.Small
  • 17 Plastic.Small
  • 18 Plastic.Medium
  • 19 Plastic.Large
  • 20 Pottery.Small
  • 21 Pottery.Medium
  • 22 Pottery.Large
  • 23 Pottery.Huge
  • 24 Glass.Window
health
Strength
integer0Number of points of damage to take before breaking. 0 means don't break.
material
Material Type
intchoices0BreakableBrushSet to the material type of the brush. Used to decide what sounds to make when damaged, and what gibs to produce when broken.
  • 0 Glass
  • 1 Wood
  • 2 Metal
  • 3 Flesh
  • 4 CinderBlock
  • 5 Ceiling Tile
  • 6 Computer
  • 7 Unbreakable Glass
  • 8 Rocks
  • 10 None
explosion
Gibs Direction
intchoices0BreakableBrushUsed to decide which direction to throw gibs when broken.
  • 0 Random
  • 1 Relative to Attack
  • 2 Use Precise Gib Dir
nodamageforces
Damaging it Doesn't Push It
boolean0BreakableBrushUsed to determine whether or not damage should cause the brush to move.
spawnobject
Spawn On Break
intchoices0BreakableBrushWhen broken, an entity of the selected type will be created.
  • 0
  • 1 item_battery
  • 2 item_healthkit
  • 3 item_ammo_pistol
  • 4 item_ammo_pistol_large
  • 5 item_ammo_smg1
  • 6 item_ammo_smg1_large
  • 7 item_ammo_ar2
  • 8 item_ammo_ar2_large
  • 9 item_box_buckshot
  • 10 item_flare_round
  • 11 item_box_flare_rounds
  • 12 item_ml_grenade
  • 13 item_smg1_grenade
  • 14 item_box_sniper_rounds
  • 15 unused1
  • 16 weapon_stunstick
  • 17 weapon_ar1
  • 18 weapon_ar2
  • 19 unused2
  • 20 weapon_ml
  • 21 weapon_smg1
  • 22 weapon_smg2
  • 23 weapon_slam
  • 24 weapon_shotgun
  • 25 weapon_molotov
  • 26 item_dynamic_resupply
explodemagnitude
Explode Magnitude
integer0BreakableBrushIf non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage.
pressuredelay
Pressure Delay
float0BreakableBrushDelay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart).
renderfx
Render FX
choiceskRenderFxNoneRenderFxChoices
  • kRenderFxNone Normal
  • kRenderFxPulseSlow Slow Pulse
  • kRenderFxPulseFast Fast Pulse
  • kRenderFxPulseSlowWide Slow Wide Pulse
  • kRenderFxPulseFastWide Fast Wide Pulse
  • kRenderFxStrobeSlow Slow Strobe
  • kRenderFxStrobeFast Fast Strobe
  • kRenderFxStrobeFaster Faster Strobe
  • kRenderFxFlickerSlow Slow Flicker
  • kRenderFxFlickerFast Fast Flicker
  • kRenderFxFadeSlow Slow Fade Away
  • kRenderFxFadeFast Fast Fade Away
  • kRenderFxSolidSlow Slow Become Solid
  • kRenderFxSolidFast Fast Become Solid
  • kRenderFxNoDissipation Constant Glow
  • 15 Distort
  • 16 Hologram (Distort + fade)
  • 23 Cull By Distance (TEST)
  • 24 Spotlight FX
  • 26 Fade Near
rendermode
Render Mode
choiceskRenderNormalRenderModeChoicesUsed to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.
  • kRenderNormal Normal
  • kRenderTransColor Color
  • kRenderTransTexture Texture
  • kRenderGlow Glow
  • kRenderTransAlpha Solid
  • kRenderTransAdd Additive
  • kRenderTransAddFrameBlend Additive Fractional Frame
  • kRenderWorldGlow World Space Glow
  • kRenderNone Dont Render
  • kRenderDevVisualizer Dev Visualizer
renderamt
FX Amount (0 - 255)
integer255RenderFieldsThe FX amount is used by the selected Render Mode.
rendercolor
FX Color (R G B)
color255255 255 255RenderFieldsThe FX color is used by the selected Render Mode.
disablereceiveshadows
Disable Receiving Shadows
boolean0RenderFields
fademindist
Start Fade Dist
float-1RenderFieldsDistance at which the overlay starts to fade (-1 = subtract from fademaxdist).
fademaxdist
End Fade Dist
float0RenderFieldsMaximum distance at which the overlay is visible (0 = don't fade out).
object_culling
Culling Behaviour
intchoices0RenderFieldsModifies culling behaviour when the object is small / distant
  • 0 Default
  • 1 Smaller than default
  • 2 Much smaller than default
  • 3 When extremely small
rendertocubemaps
Render to Cubemaps
boolean0RenderFieldsIf true, this geometry renders into baked cube maps
lightmapstatic
Lightmap Static
intchoices0RenderFieldsDetermines if this geometry be considered static & cast shadows/bounce light when baking lightmaps?
  • 0 No
  • 1 Yes
  • 2 Bounce Only
skipPreSettle
Skip pre-settle
boolean0BasePhysicsSimulatedIf set this entity will not particpate in the physics pre-settle during compile, but will start awake in game.
_minlight
Minimum Light Level
stringThe minimum level of ambient light that hits this brush.
add_modifier
Add Modifier
stringWill add this modifier when the entity spawns.
Damagetype
Impact Damage Type
intchoices0
  • -1 Disabled
  • 0 Blunt
  • 1 Sharp
gamemass
Mass Override
integer0Override the mass of the object instead of calculating it based on the size / shape and material.
massScale
Mass Scale
float0A scale multiplier for the object's mass. 0 = use auto-calculated mass based on the object's size / shape and material
masscenteroffset
Center of Mass Offset
vector0 0 0Offset in local space applied to the object's center of mass.
buoyancyscale
Buoyancy Scale
float1Scale on the buoyancy forces applied to this object (not including fluid drag)
fluiddragscale
Fluid Drag Scale
float1Scale on fluid forces applied to this object (not including buoyancy)
collisionGroup
Collision Group
stringOverride the default collision group
interactsAs
Interacts As
stringcomma-separated list of interaction layers
interactsWith
Interacts With
stringcomma-separated list of interaction layers to interact with
interactsExclude
Interacts Exclude
stringcomma-separated list of interaction layers to not collide with
damagetoenablemotion
Health Level to Override Motion
integer0If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.
forcetoenablemotion
Physics Impact Force to Override Motion
float0If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion.
enableuseoutput
Enable +Use Output
boolean0Enables OnPlayerUse output being fired when this object is used
hoverposeflagsflags
  • 1 Position
  • 2 Angles
hoverposeposition
Player-carry Hover Position
vector0 0 0If the hoverposeflags Position flag is set, this position is the position which the object should move when the player picks it up, with the physgun or +USE.
hoverposeangles
Player-carry Hover Angles
vector0 0 0If the hoverposeflags Angles flag is set, this angle is the angle which the object should orient to when the player picks it up, with the physgun or +USE.
notsolid
Not solid to world
intchoices0
  • 0 Solid to World
  • 1 Passes through World
touchoutputperentitydelay
Start Touch Per Entity Refire Delay
float0When set to 0 OnStartTouch events are never sent. Otherwise it's a delay in seconds before another OnStartTouch is sent for the same entity.