Player.ViewPunchReset

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player.ViewPunchReset( )
Where is this used?
Description:
Instantly snaps the player's view back to normal if a Player:ViewPunch hasn't expired yet.
Returns: nil
Part of Library: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.ViewPunchReset]Player.ViewPunchReset [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionHeres an example that makes ViewPunch abit more realistic when used in a SWEP
Used onNewerShared.png
Code
self.Owner:ViewPunchReset() //First reset it from the last punch(if it hasn't expired yet).
self.Owner:ViewPunch( Angle( -5, 0, 0 ) ) // Then punch the players view.
OutputNone


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox