Please, how could I pass a table of vertices, as the following, to b2.PolygonShape:set()?
local vertices = {-100,20, 160,20, 160,34, -160,34} |
I tried this:
local objShape = b2.PolygonShape.new()
objShape:set(table.concat(vertices, ",")) |
...but it doesn't work because the return of table.concat is an string.
I really really need that, because I import the arrays of vertices from text files. Please, is there any chance to make the set function to accept a table instead?
Thanks in advance
Comments
Likes: Drix, atilim