weapon_physgun

From Valve Developer Community
Revision as of 08:29, 30 August 2025 by Cvoxalury (talk | contribs) (Template formatting, some rewording and further explanation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The leaked Physgun model.
C++ Class hierarchy
CWeaponGravityGun
CBaseCombatWeapon
CBaseAnimating
CBaseEntity
C++ physgun.cpp
Not to be confused with Weapon_physcannon.
Obsolete-notext.png
This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
Info-red.png
This entity is not in the game by default, but still has code available for it in the SDK.
This feature is not available anymore.
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.

weapon_physgun is a cut point entity available in Half-Life 2 Half-Life 2. It was used by the developers to assist integration of physics into the gameplay of Half-Life 2, and later when demonstrating physics capabilities at E3 2003. The code for it was included in the Source SDK. Many entity keyvalues and settings, such as Physgun interactions, still refer to it by name, even though they should all be used in the context of the physcannon (the Gravity Gun).

Some mods, such as SMOD: Redux and Garry's Mod, use it in their gameplay.

Entity Description

Essentially a long range Gravity Gun, it could manipulate objects from afar with a fishing rod-like laser beam. Pressing the +Use key while holding an object with the beam, then using the mousewheel allows adjusting the distance to the object.

The alt-fire deploys a 'glue blob' which can be attached to physical objects or the world, working as a dynamic constraint. When a blob attached to an object enters into proximity with another blob, it will attempt to weld with it.

In Garry's Mod the Physgun can manipulate objects and freeze them mid-air, but lacks the alt-fire welding mechanics. It uses the upgraded Gravity Gun model rather than the cut Physgun model.

Flags

Start Constrained : [1]
Prevents the model from moving.
Deny player pickup (reserve for NPC) : [2]
Not puntable by Gravity Gun : [4]

Inputs

HideWeapon  !FGD
If this weapon is being held, hide the worldmodel and/or viewmodel via EF_NODRAW. Weapon will still be useable. The weapon will become visible again if the holder is to switch between weapons in their inventory.

Outputs

OnNPCPickup
Fires when an NPC picks up this weapon. (!activator is the NPC.)
OnPlayerUse
Fires when the player +uses this weapon. (!activator is the player.)
OnPlayerPickup
Fires when a player picks up this weapon. (!activator is the player.)
OnCacheInteraction
Fires when the player 'proves' they've found this weapon. Fires on: Player Touch, +USE pickup, Physcannon pickup, Physcannon punt.

External links

Combine overwiki icon.png Physgun on the Combine OverWiki