Unpack is designed to unpack vectors rather than tables, eg
translate(pos:unpack())
Unpack is designed to unpack vectors rather than tables, eg
translate(pos:unpack())
Actually, unpack is for tables. It just won’t unpack keyed values in a table. The last example unpacks the numbers by themselves, but ignores the keyed numbers.
function setup()
tab={vec2(1,2),vec3(1,2,3),vec4(1,2,3,4)}
print(unpack(tab))
tab={1,2,3,4,5,6,7,8}
print(unpack(tab))
tab={1,a=11,2,b=22,3,c=33}
print(unpack(tab))
end