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: 40ms

Session 0
DB GetPage 11
Generate Html 5
SaveChanges 10
Render Body 0
Render Sidebar 12