I know this can be done in this way:-
shapeTail = {149,300,124,257,133,208,147,197,165,197,169,241,174,258}
shapeBase = {174,258,204,260,219,250,277,251,252,299,199,319,156,308}
shapeTop = {221,247,205,193,166,87,277,120,275,260}
physics.addBody(tmp, {shape = shapeTail, bounce = 0.3, friction = 0.3}, {shape = shapeBase, bounce = 0.3, friction = 0.3}, {shape = shapeTop, bounce = 0.3, friction = 0.3})
But what I’m looking for is a system where I can generate the data before the function is called and looking as to how it can be passed in to generate multiple objects. I have tried an array like this:-
shapeTail = {149,300,124,257,133,208,147,197,165,197,169,241,174,258}
shapeBase = {174,258,204,260,219,250,277,251,252,299,199,319,156,308}
shapeTop = {221,247,205,193,166,87,277,120,275,260}
test = {{shape = shapeTail, bounce = 0.3, friction = 0.3}, {shape = shapeBase, bounce = 0.3, friction = 0.3}, {shape = shapeTop, bounce = 0.3, friction = 0.3}}
physics.addBody(tmp, test)
I also tried adding the bodies individually similar to this:-
physics.addBody(tmp, {shape = shapeTail, bounce = 0.3, friction = 0.3})
physics.addBody(tmp, {shape = shapeBase, bounce = 0.3, friction = 0.3})
But this only display a single physics body still.
Basically long story short, I’m looping through an array /database call which has different object bodies in it an trying to attach them all to a single object. Is anyone able to point me in the right direction for this?
Thanks in advance for your help!
I hope that makes sense… [import]uid: 133056 topic_id: 25100 reply_id: 325100[/import]

