Garry's Mod Wiki

WEAPON:CalcView

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

Description

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.

SWEPs that define this function will not work with the taunt camera.

Arguments

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

Returns

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

Page Links


Special Pages


Wikis

?

Render Time: 133ms

DB GetPage 66
Generate Html 15
SaveChanges (1) 37
Render Body 0
Render Sidebar 11