Garry's Mod Wiki

Revision Difference

Player:ViewPunch#546745

<function name="ViewPunch" parent="Player" type="classfunc"> <description>Simulates a push on the client's screen. This **adds** view punch velocity, and does not touch the current view punch angle, for which you can use <page>Player:SetViewPunchAngles</page>.⤶ <bug>Although this hook is shared, it appears to have no effect when run client-side. Works fine server-side, however. </bug>⤶ </description>⤶ ⤶ ⤶ ⤶ <realm>Shared</realm>⤶ <description>Simulates a push on the client's screen. This **adds** view punch velocity, and does not touch the current view punch angle, for which you can use <page>Player:SetViewPunchAngles</page>.</description>⤶ <realm>Shared</realm>⤶ <args> <arg name="PunchAngle" type="Angle">The angle in which to push the player's screen.</arg> </args> </function> <example> <description>Knocks the player's camera upward</description> <code>Entity( 1 ):ViewPunch( Angle( -10, 0, 0 ) )</code> ⤶ </example></example>