SWEP.GetViewModelPosition

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameGetViewModelPosition
SyntaxSWEP:GetViewModelPosition( Vector Pos, Vector Ang )
DescriptionAllows you to move and rotate the Viewmodel.
ReturnsVector Pos, Vector Ang
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.GetViewModelPosition]SWEP.GetViewModelPosition [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionRotates the viewmodel 90 degrees.
Used onNewerClient.png
Code
function SWEP:GetViewModelPosition( pos, ang )
 
	ang:RotateAroundAxis( ang:Forward(), 90 )
 
	return pos, ang
 
end
OutputN/A

Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox