Weapon physgun: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Template formatting, some rewording and further explanation)
 
(19 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{wrongtitle|title=weapon_physgun}}
[[File:v_physgun.png|thumb|right|175px|The leaked Physgun model.]]
[[Category:Entities]]
{{CD|CWeaponGravityGun|file1=physgun}}
{{distinguish|Weapon_physcannon}}
{{obsolete|entity=1}}
{{ent not in game|in sdk=1}}
{{ent not in fgd}}
{{this is a|point entity|cut=1|name=weapon_physgun|game=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 phys''cannon'' (the [[Gravity Gun]]).
 
Some mods, such as '''[[SMOD: Redux]]''' and {{Garry's Mod|3.1}}, use it in their gameplay.
 
==Entity Description==
==Entity Description==
'''Entity Name:''' weapon_physgun
Essentially a long range Gravity Gun, it could manipulate objects from afar with a fishing rod-like laser beam. Pressing the [[use|+Use]] key while holding an object with the beam, then using the mousewheel allows adjusting the distance to the object.
 
The [[weapon_physgun]] (not to be confused with [[weapon_physcannon]]) was originally a weapon that could manipulate objects by dragging across the screen. This weapon is disabled in Half-Life 2.


----
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.
==History==
In the final stages of the game the [[weapon_physgun]] was scrapped and replaced with the [[weapon_physcannon]].


Some mods such as [[Garry's Mod]] and [[JBMod]] resurrect the physgun to this day.
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.


[[Category:Entities]]
{{BasicWeapon}}
----
===See Also===
[http://www.garry.tv/garrysmod/ Garry's Mod]


[http://jbmod.hl2world.com/ JBMod]
==External links==
{{cow|Physgun}} on the Combine OverWiki


[[List of entities]]
[[Category:Cut Weapons]]

Latest revision as of 08:29, 30 August 2025

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