new Vec2

From GTA Connected
Revision as of 21:16, 23 June 2026 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Server and Client GTAIII Logo.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Server 1.0.0, Client 1.0.0
Vec2 new Vec2([ float x = 0.0 ], [ float y = 0.0 ])
The new Vec2 function is used to create a 2D vector.

Parameters

1) float x Optional, defaults to 0.0. The X value for the 2D vector.
2) float y Optional, defaults to 0.0. The Y value for the 2D vector.

Return

Vec2 A 2D vector object.

Types

Shared Vec2

Notes

There aren't any notes for this function.

Examples

Example 1 - JavaScript:

let position = new Vec2(10.0, 20.0)

Compatibility

There isn't any compatibility information for this function.