Browsing StarfallEx's section
โ† Back to ACE
Back to StarfallEx

SFEX.trace.aimVector

S๐Ÿท๏ธ Trace

Part of StarfallEx namespace

๐Ÿ”— External
trace.aimVector(viewAngles, viewFOV, x, y, screenWidth, screenHeight)
View on GitHub|lua/starfall/libs_sh/trace.lua:252
๐Ÿ“‹ Has LDoc๐Ÿ‘๏ธ 0 viewsUpdated 2 months ago

Description

Calculates the aim vector from a 2D screen position. This is essentially a generic version of input.screenToVector, where you can define the view angles and screen size manually.

Parameters

NameTypeDescription
viewAnglesAngleView angles
viewFOVnumberView field of view
xnumberX position on the screen
ynumberY position on the screen
screenWidthnumberScreen width
screenHeightnumberScreen height

Returns

TypeDescription
VectorThe aim vector

Examples

No examples available.

Used In

No usages found in the codebase.