Hello everyone! I’m co-developing a game while learning how to use both Defold and Lua.
While I’m having no problems finding answers to most of my issues I find myself stuck trying to make functional chain for an anchor with JOINT_TYPE_HINGE.
So this is the actual item collection, as you can see it has the collision objects and it works as it should.
But my issue is with the code. As you can see below I had to repeat the code a few times and this, I think, it would work fine, it mainly does what it’s supposed to do and also is not too long. But the chain will need to be larger in our project. So my question is: Is there a simpler way to create this Joints? Can I create them with a table or array? My co-worker says I can but I can’t seem to wrap my head around how I could make it work