util.AimVector

From Garry's Mod
Jump to: navigation, search
 util.AimVector( )

Contents

Description

Function used to calculate aim vector from 2D screen position. It is used in SuperDOF calculate Distance.

Essentially a generic version of gui.ScreenToVector.

Arguments

Angle ViewAngles

View angles

Arguments

number ViewFOV

View Field of View

Arguments

number x

Mouse X position

Arguments

number y

Mouse Y position

Arguments

number scrWidth

Screen width

Arguments

number scrHeight

Screen height

Returns

Vector

Calculated aim vector
Personal tools
Navigation