Garry's Mod Wiki


Vector util.AimVector( Angle ViewAngles, number ViewFOV, number x, number y, number scrWidth, number scrHeight )


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

Essentially a generic version of gui.ScreenToVector.


1 Angle ViewAngles
View angles
2 number ViewFOV
View Field of View
3 number x
Mouse X position
4 number y
Mouse Y position
5 number scrWidth
Screen width
6 number scrHeight
Screen height


1 Vector
Calculated aim vector

Page Links

Special Pages



Render Time: 71ms

DB GetPage 29
Generate Html 20
SaveChanges (1) 14
Render Body 0
Render Sidebar 6