Greetings,
I’m curious if this is possible, and if so, how to do it.
I have one display object, setup with multiple-element physics bodies.
local object = display.newRect(0,0,600,600) local shape1 = { 0,-280, -75,-270, -75,-250, 0, -260 } local shape2 = { -70,-270, -170,-225, -155,-215, -70, -250 } local shape3 = { -230,-160, -268,-70, -250,-70, -215, -150 } local shape4 = { -268,-80, -275,40, -260,40, -250, -80 } local shape5 = { -275,30, -255,125, -240,125, -260, 30 } local shape6 = { -252,120, -200,200, -180,200, -235, 120 } physics.addBody( object, "static", { density=6.0, friction=0.6, bounce=0.2, shape=shape1, filter = goThruFilter }, { density=6.0, friction=0.6, bounce=0.2, shape=shape2, filter = goThruFilter }, { density=6.0, friction=0.6, bounce=0.2, shape=shape3, filter = goThruFilter }, { density=6.0, friction=0.6, bounce=0.2, shape=shape4, filter = goThruFilter }, { density=6.0, friction=0.6, bounce=0.2, shape=shape5, filter = goThruFilter }, { density=6.0, friction=0.6, bounce=0.2, shape=shape6, filter = goThruFilter } )
I tried searching but can’t find an answer… but say if I just want to remove the physics body element ‘shape3’… but keep the rest. Actually would be making it ‘object.isBodyActive’ but want to apply it only to ONE of those elements… This possible and how? Thanks!