Vec3
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) m |
||
Line 8: | Line 8: | ||
pos = (getPosition(object) + vec3(1, 0, 0)) * 2 | pos = (getPosition(object) + vec3(1, 0, 0)) * 2 | ||
− | + | ||
-- it's still a table like before : | -- it's still a table like before : | ||
x = pos[1] | x = pos[1] |
Revision as of 18:30, 8 February 2014
vec3(x, y, z)
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]