Garry's Mod Wiki


  Vector, Angle, number WEAPON:CalcView( Player ply, Vector pos, Angle ang, number fov )


Allows you to adjust player view while this weapon in use.

This hook is called from the default implementation of GM:CalcView which is here. Therefore, it will not be called if any other hook added to CalcView returns any value, or if the current gamemode overrides the default hook and does not call the SWEP function.


1 Player ply
The owner of weapon
2 Vector pos
Current position of players view
3 Angle ang
Current angles of players view
4 number fov
Current FOV of players view


1 Vector
New position of players view
2 Angle
New angle of players view
3 number
New FOV of players view