Hi there,
In corona game edition, we can add new physic body by call physics.addbody.
instance = movieclip.newAnim{ "GFX/ingame/normal\_rock.png", "GFX/ingame/normal\_rock\_break1.png", "GFX/ingame/normal\_rock\_break2.png" }
physics.addBody( instance, { density=5.0, friction=1.0,bounce=0.4 } )
instance.myName = "block4test"
But in my game, I need to remove physic body from the instance.
I’ve tried both instance.remove(1) and instance.remove(2) but still have no lucky.
There is no physics.removeBody method, too.
Please tell me, how to remove an existed physic body from an object (in order to turn it become a normal sprite)
Thank you.
[import]uid: 9190 topic_id: 3081 reply_id: 303081[/import]
Additionally, I would enjoy a method to dynamically change Collision Filter groups for any object… those can be declared when the physics body is created, but I don’t think they can be changed during runtime, i.e. when a collision occurs or a button is pressed or whatever.