WEAPON/TranslateFOV

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Bug)
(Now shared)
Line 2: Line 2:
 
|Description=Allows to change players field of view while player holds the weapon.
 
|Description=Allows to change players field of view while player holds the weapon.
  
{{Bug|Issue=3564|This doesn't affect the opening of func_areaportals - {{ClassFunction|Player|GetFOV}} takes priority.}}
+
{{Bug|Fixed=|Issue=3564|This doesn't affect the opening of func_areaportals - {{ClassFunction|Player|GetFOV}} takes priority.}}
|Realm=Client
+
 
 +
{{NextUpdate|The hook is currently clientside-only, but will be shared next update.}}
 +
|Realm=Shared
 
|Predicted=No
 
|Predicted=No
 
}}
 
}}

Revision as of 18:19, 24 October 2019

 WEAPON:TranslateFOV( )

Contents

Description

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

BUG

This doesn't affect the opening of func_areaportals - Player:GetFOV takes priority.

Issue Tracker: #3564

This bug will be fixed in the next update.


Next Update Change

The hook is currently clientside-only, but will be shared next update.

Arguments

number fov

The current/default FOV.

Returns

number

The target FOV.

Examples

Example

Reduces players FOV by 30.

function SWEP:TranslateFOV( fov )
	return fov - 30
end

Output:

Players view is zoomed in.
Personal tools
Navigation