title: b2body and b2fixture into array
body: <p>can i adding b2body or b2fixture into NSmutableArray or NSArray.?<br>
  i've been looking for some solutions, one of them says it should be insert into NSValue first then adding the value to nsmutable array. so i write this in my code:  </p>
  
  <pre><code>// Create ball body 
  
            b2BodyDef ballBodyDef;   
            ballBodyDef.type = b2_dynamicBody;
            ballBodyDef.position.Set(0/PTM_RATIO, 300/PTM_RATIO);
              ballBodyDef.userData = [ballSpriteArray objectAtIndex:a];
  
          _ballBody = _world-&gt;CreateBody(&amp;ballBodyDef);
  
  
          // Create circle shape on ball
          b2CircleShape circle;
          circle.m_radius = 30.0/PTM_RATIO;
  
          // Create shape definition and add to body
          b2FixtureDef ballShapeDef;
          ballShapeDef.shape = &amp;circle; 
          ballShapeDef.density = 0.5f;  
          ballShapeDef.friction = 0.5f; 
          ballShapeDef.restitution = 0.6f; 
          _ballFixture = _ballBody-&gt;CreateFixture(&amp;ballShapeDef);
          fixValue = [NSValue valueWithBytes:&amp;_ballFixture objCType:@encode(struct b2Fixture)];
                     [ballFixtureArray addObject:fixValue];
  
  
  
          //memberi impulse awal terhadap bola
          b2Vec2 force = b2Vec2(5, 10);
          _ballBody-&gt;ApplyLinearImpulse(force, ballBodyDef.position);
          bodyValue = [NSValue valueWithBytes:&amp;_ballBody objCType:@encode(struct b2Body)];
          [ballBodyArray addObject:bodyValue];
  </code></pre>
  
  <p>to get every b2Fixture and b2body on that nsmutablearray i did like this in CCtouchBegan Method:  </p>
  
  <pre><code>for(NSValue *val in ballFixtureArray)
  {
      b2Fixture *ballFix;
      [val getValue:&amp;ballFix];
  
  
      if (ballFix-&gt;TestPoint(locationWorld)) {
      //if([ballFixtureArray objectAtIndex:0]-&gt;TestPoint(locationWorld)){
          for (NSValue *bodyVal in ballBodyArray){
              b2MouseJointDef md;
              md.bodyA = _groundBody;
              b2Body *ballBody;
              [bodyVal getValue:&amp;ballBody];
              md.bodyB = ballBody;
              md.target = locationWorld;
              md.collideConnected = true;
              md.maxForce = 1000.0f * ballBody-&gt;GetMass();
              _mouseJoint = (b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);
              ballBody-&gt;SetAwake(true);
          }
      }
  }
  </code></pre>
  
  <p>but it doesnt work, in other hand the application just crash when i touch every location on the screen..<br>
  is there somebody can help me..??<br>
  thnx before for every advance..<br>
  regards</p>