Vec3
(Difference between revisions)
(Created page with "Minimal vector manipulation for 3d vector, compatible with the current table system : vec = vec3(x, y, z) allowing basic math (addition, multiplication etc), for example : ...") |
Dahnielson (Talk | contribs) |
||
Line 11: | Line 11: | ||
y = pos[2] | y = pos[2] | ||
z = pos[3] | z = pos[3] | ||
+ | |||
+ | [[Category:Lua scripting]] |
Revision as of 17:57, 4 February 2014
Minimal vector manipulation for 3d vector, compatible with the current table system :
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]