vec3.new: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{ScriptItem2 |name = new Vec3 |side = shared |type = function |class = Vec3 |games = iii vc sa iv |desc = create a 3D vector |arg1 = float x The X value for the 3D vector. |arg2 = float y The Y value for the 3D vector. |arg3 = float z The Z value for the 3D vector. |return = Vec3 a 3D vector object }}") |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 6: | Line 6: | ||
|games = iii vc sa iv | |games = iii vc sa iv | ||
|desc = create a 3D vector | |desc = create a 3D vector | ||
|arg1 = float x The X value for the 3D vector. | |arg1 = [float x = 0.0] The X value for the 3D vector. | ||
|arg2 = float y The Y value for the 3D vector. | |arg2 = [float y = 0.0] The Y value for the 3D vector. | ||
|arg3 = float z The Z value for the 3D vector. | |arg3 = [float z = 0.0] The Z value for the 3D vector. | ||
|return = Vec3 a 3D vector object | |return = Vec3 a 3D vector object | ||
|exampleJS = let position = new Vec3(10.0, 20.0, 30.0) | |||
}} | }} | ||
Latest revision as of 21:16, 23 June 2026
Function Server and Client
![]()
Online and Offline
Available since Server 1.0.0, Client 1.0.0
Vec3 new Vec3([ float x = 0.0 ], [ float y = 0.0 ], [ float z = 0.0 ])
The new Vec3 function is used to create a 3D vector.
Parameters
| 1) | float | x | Optional, defaults to 0.0. The X value for the 3D vector. |
| 2) | float | y | Optional, defaults to 0.0. The Y value for the 3D vector. |
| 3) | float | z | Optional, defaults to 0.0. The Z value for the 3D vector. |
Return
| Vec3 | A 3D vector object. |
Types
Shared Vec3
Notes
There aren't any notes for this function.
Examples
Example 1 - JavaScript:
let position = new Vec3(10.0, 20.0, 30.0)
Compatibility
There isn't any compatibility information for this function.