title: how to remove a box2d Fixture
body: <p>I have a square barrier that has edges defined at run time based on where the user puts the position and rotation of my barrier.  </p>
  
  <pre><code>b2BodyDef barrierBodyDef;
  barrierBodyDef.type = b2_staticBody;
  barrierBodyDef.position.Set(curBarrier
                              .position.x/PTM_RATIO, curBarrier.position.y/PTM_RATIO);
  barrierBodyDef.userData = curBarrier;
  
  
  b2Body *barrierBody;
  barrierBody = _world-&gt;CreateBody(&amp;barrierBodyDef);
  
  b2EdgeShape barrierEdge;
  b2FixtureDef barrierShapeDef;
  barrierShapeDef.shape = &amp;barrierEdge;
  barrierShapeDef.friction = 1.0f;
  
  barrierEdge.Set(b2Vec2((x1)/PTM_RATIO, (y1)/PTM_RATIO),
                  b2Vec2((x2)/PTM_RATIO, (y2)/PTM_RATIO));
  barrierBody-&gt;CreateFixture(&amp;barrierShapeDef);
  barrierEdge.Set(b2Vec2((x2)/PTM_RATIO, (y2)/PTM_RATIO),
                  b2Vec2((x3)/PTM_RATIO, (y3)/PTM_RATIO));
  barrierBody-&gt;CreateFixture(&amp;barrierShapeDef);
  barrierEdge.Set(b2Vec2((x3)/PTM_RATIO, (y3)/PTM_RATIO),
                  b2Vec2((x4)/PTM_RATIO, (y4)/PTM_RATIO));
  barrierBody-&gt;CreateFixture(&amp;barrierShapeDef);
  barrierEdge.Set(b2Vec2((x4)/PTM_RATIO, (y4)/PTM_RATIO),
                  b2Vec2((x1)/PTM_RATIO, (y1)/PTM_RATIO));
  barrierBody-&gt;CreateFixture(&amp;barrierShapeDef);
  </code></pre>
  
  <p>I now want to delete these edges, so that the user can re-position the barrier.</p>
  
  <p>How do I go about removing the edges between point x1,y1, -> x4,y4, so that they are immune to collisions.</p>
  
  <p>I am a bit new to Box2D.</p>