Similar to the problem I have with removing bodies is remoing joints:
The joint simply isn't removed and nothing happens. "joint" is the reference returned when I created the joint (return CreateJoint(jointDef) as b2RevoluteJoint;)
Code:
if(joint != null)
{
var test:b2Vec2 = joint.GetReactionForce(0.1);
if( test.Length() > 1000){
global.world.DestroyJoint(joint);
joint = null;
}
}
{
var test:b2Vec2 = joint.GetReactionForce(0.1);
if( test.Length() > 1000){
global.world.DestroyJoint(joint);
joint = null;
}
}
The joint simply isn't removed and nothing happens. "joint" is the reference returned when I created the joint (return CreateJoint(jointDef) as b2RevoluteJoint;)