SWEP.GetViewModelPosition
From GMod Wiki
Event Hook | |
Hook Name | GetViewModelPosition |
Syntax | SWEP:GetViewModelPosition( Vector Pos, Vector Ang ) |
Description | Allows you to move and rotate the Viewmodel. |
Returns | Vector Pos, Vector Ang |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=SWEP.GetViewModelPosition]SWEP.GetViewModelPosition [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Rotates the viewmodel 90 degrees. |
---|---|
Used on | |
Code | function SWEP:GetViewModelPosition( pos, ang ) ang:RotateAroundAxis( ang:Forward(), 90 ) return pos, ang end |
Output | N/A |
Additional Notes
- This function is run every frame in GM:CalcView in base gamemode. If you override this function in a custom gamemode, GetViewModelPosition will no longer be called.