Garry's Mod Wiki

WEAPON:TranslateFOV

number WEAPON:TranslateFOV( number fov )

Description

Allows to change players field of view while player holds the weapon.

This hook must be defined shared and return same value on both to properly affect Area Portals.

Arguments

1 number fov
The current/default FOV.

Returns

1 number
The target FOV.

Example

Reduces players FOV by 30.

function SWEP:TranslateFOV( fov ) return fov - 30 end
Output: Players view is zoomed in.

Page Links


Special Pages


Wikis

?

Render Time: 31ms

DB GetPage 5
Generate Html 3
SaveChanges (1) 9
Render Body 0
Render Sidebar 11