Restoring Collisions after joint removal

Feb 16, 2011 at 4:19 AM
Edited Feb 16, 2011 at 4:19 AM


So im using the following code to remove a weld joint from my fixtures:



if (input.RMouseButtonPressed)


The problem is that after the joint has been removed the fixtures no longer interact with each-other.

Is there some way to restore collisions between to objects that have had the weld joint removed?

I have tried using:



but to no avail.



Feb 16, 2011 at 3:51 PM

Don't remove the body from the JointList. Use World.RemoveJoint() instead.

Feb 16, 2011 at 4:23 PM

Thanks for the response.

I tried using that before. and I get a Null Reference exception when I use this line:


Is there a better way to access the joint?



Feb 16, 2011 at 4:31 PM

When you create the joint, store a reference too it in the class that creates it. What you are doing is not going to work.