Vec3
From MaratisWiki
Revision as of 18:51, 8 February 2014 by Dahnielson (Talk | contribs)
vec3(x, y, z)
Minimal vector manipulation for 3d vector, compatible with the current table system.
-
x
: the x component of the vector -
y
: the y component of the vector -
z
: the z component of the vector
vec = vec3(x, y, z)
allowing basic math (addition, multiplication etc), for example :
pos = (getPosition(object) + vec3(1, 0, 0)) * 2 -- it's still a table like before : x = pos[1] y = pos[2] z = pos[3]