Player.ViewPunch

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player.ViewPunch( Angle aPunch )
Where is this used?
Description:
Shifts the player's view by the given angles (as if he had just been punched or thrown by a recoiling weapon). It will return to normal shortly afterwards (around a second later).
Returns: nil
Part of Library: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.ViewPunch]Player.ViewPunch [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis is how you would use it for a common SWEP
Used onNewerShared.png
Code
self.Owner:ViewPunch( Angle( -5, 0, 0 ) ) // This is what you would use for a SWEP viewpunch.
OutputNone


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox