kleepklep Posted October 21, 2015 Share Posted October 21, 2015 I'm using the Box2D plugin and haven't been able to figure out how to remove / destroy joints. Anyone know how to do this? Link to comment Share on other sites More sharing options...
chongdashu Posted October 22, 2015 Share Posted October 22, 2015 I don't have the plug-in, but if it's based on the Box2D API, there should be a World.destroyJoint() method. Link to comment Share on other sites More sharing options...
Mattia Posted October 22, 2015 Share Posted October 22, 2015 I've just tried and tested this:var j = game.physics.box2d.distanceJoint(spriteA, spriteB); //create the joint from box2d examplegame.physics.box2d.world.DestroyJoint(j); //destroy the above jointIt should work fine kleepklep and chongdashu 2 Link to comment Share on other sites More sharing options...
kleepklep Posted October 22, 2015 Author Share Posted October 22, 2015 Thanks! That worked great! Link to comment Share on other sites More sharing options...
Mattia Posted October 22, 2015 Share Posted October 22, 2015 Glad of being of help!You can label this topic as answered for further reference if you like Link to comment Share on other sites More sharing options...
enriqueto Posted August 16, 2016 Share Posted August 16, 2016 to destroy the joint do that: this.game.physics.box2d.world.DestroyJoint(joint); Link to comment Share on other sites More sharing options...
Recommended Posts