Garry's Mod Wiki

WEAPON:TranslateFOV

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.

Special Pages


Wikis

?

Render Time: 48ms

DB GetPage 31
Generate Html 2
SaveChanges (1) 5
Render Body 0
Render Sidebar 7