Env viewpunch: Difference between revisions
Jump to navigation
Jump to search
Note:Players in vehicle are unaffected.
No edit summary |
No edit summary |
||
(14 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{CD|CEnvViewPunch|file1=1}} | ||
== | {{This is a|logical entity|engine=Source|name=env_viewpunch}} It applies a view punch according to the origin, radius, and angle. Generally, it moves the screen as if the player was "punched". | ||
{{note|Players in vehicle are unaffected.}} | |||
==Keyvalues== | {{note|Doesn't seem to work in {{l4d2}}. Using netprop <code>m_Local.m_vecPunchAngle</code> is possible instead}} | ||
== Keyvalues == | |||
{{KV Targetname}} | |||
{{KV|Punch angles|intn=punchangle|angle|The punch angles to apply.}} | |||
{{KV|Effect Radius|intn=radius|float|The radius around this entity in which to affect players. (0 means all clients)}} | |||
==Flags== | |||
== Flags == | |||
{{fl|1|Punch all players (ignore radius)}} | |||
{{fl|2|Punch players in the air}} | |||
==Inputs== | == Inputs == | ||
{{I|ViewPunch|Performs the view punch.}} | |||
== Convars == | |||
== | {{varcom|start}} | ||
{{varcom|sv_suppress_viewpunch|0|bool|Whether the view punch should take effect}} | |||
{{varcom|end}} |
Latest revision as of 04:31, 29 April 2025
![]() |
---|
CEnvViewPunch |
![]() |
env_viewpunch
is a logical entity available in all Source games. It applies a view punch according to the origin, radius, and angle. Generally, it moves the screen as if the player was "punched".

Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Punch angles (punchangle) <angle>
- The punch angles to apply.
- Effect Radius (radius) <float>
- The radius around this entity in which to affect players. (0 means all clients)
Flags
- Punch all players (ignore radius) : [1]
- Punch players in the air : [2]
Inputs
- ViewPunch
- Performs the view punch.
Convars
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
sv_suppress_viewpunch | 0 | bool | Whether the view punch should take effect |