I can't figure out the correct format for the vertices argument to b2.Polygon:set().
p = b2.Polygon.new()
p:set(v)
I looked through the examples but I can't find an example. I've tried numerous things:
1. v = { x={1,2,3}, y={5,6,7} }
2. v = { 1,4, 2,6, 3,7 }
3. v = { {1,4}, {2,6}, {3,7} }
Any hints?
Thanks,
--ND
Comments
If you want to use a table, you can use unpack:
local v = { 1,4, 2,6, 3,7 }
p:set(unpack(v))