Thanks.
I should have seen this from your post. You’re passing in two sets of params to the add body call:
physics.addBody( spike, "static", physicsData:get("spike"), {filter = myCC:getCollisionFilter( "spike" ) } ) ^ 1 ^ 2
You can’t do that.
Additionally, the first set of params from physicsData is a multi-body set which has defined its own set of categoryBits and maskBits for the body.
However, I have hacked together a solution for the example you gave me that may be more widely applicable if you want to use the calculator still.
Snippet of important code:
-- 1 Get body params from physicsData local body\_params = physicsData:get("spike") -- 2 print body\_params before table.print\_r(body\_params) -- 3 Replace body\_params filter categoryBits and maskBits with calculator values body\_params.filter.categoryBits = myCC:getCategoryBits( "spike" ) body\_params.filter.maskBits = myCC:getMaskBits( "spike" ) -- 4 print body\_params before table.print\_r(body\_params) -- 5 Use the modified body physics.addBody( spike, "static", body\_params )
Modified project:https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2020/03/example.zip