vec3
This class represents a three dimensional vector (x, y, and z). It is often used to represent world coordinates in the game.
Constructor: vec3(x, y, z)
Use this constructor to create new vec3
instances.
local myVec = vec3(5, 2, 8)
Properties
vec3
has three properties: x
, y
, and z
.
Example:
local myVec = vec3(5, 2, 8)
print(myVec.x) -- Prints 5
print(myVec.y) -- Prints 2
print(myVec.z) -- Prints 8