Closed taxilly closed 6 years ago
Sorry it took long to answer to this, for some reason issue creations are not showing up on my feed. You can use the addShape
and removeShape
functions to add/remove shape+fixture pairs to an existing body. The added shape/fixture pairs can be accessed via their name at collider.shapes_list[name]
and collider.fixtures_list[name]
. They're all attached to the same body under the collider, which can be accessed at collider.body
.
Is kind of limiting if I want to make bodies with multiple fixtures - connecting bodies together via WeldJoints is not a solution as they are not rigid.
My question is is how (if even possible) can I use a typical body+shape+fixture setup inside windfield, whilst still retaining all the collision classes stuff - scouring the source a little bit showed me that the box2d world is contained within box2d_world, so my first attempt was;
Which yields the error
init.lua: 185: attempt to index a nil value in function collisionEventsClear