title: sprite not updating to the correct position
body: <p>I have written a code to display using CCLog the exact position of a sprite when a mousejoint moving it is released. Below is the Sprite.mm class and the ccTouchesEnded method (which is in the HelloWorldLayer.mm class). The sprite position is not updating, the output is constantly x: 0.00 and y: 0.00.</p>
  
  <p>Sprite.mm:</p>
  
  <pre><code>-(id)addSprite:(CCLayer *)parentLayer
                   inWorld:(b2World *)world
  {
  PhysicsSprite *aSprite = [PhysicsSprite spriteWithFile:@"spriteIm.png"];
  
  aSprite.tag = 1;
  [parentLayer addChild:aSprite];
  
  b2BodyDef spriteBodyDef;
  spriteBodyDef.userData = aSprite;
  spriteBodyDef.type = b2_dynamicBody;
  CGSize s = [CCDirector sharedDirector].winSize;
  spriteBodyDef.position = [Convert toMeters:ccp(s.width * 0.25,s.height-400)];
  b2FixtureDef fixtureDef;
  fixtureDef.density = 0.01;
  b2CircleShape circleShape;
  circleShape.m_radius = aSprite.contentSize.width/2 / PTM_RATIO;
  fixtureDef.shape = &amp;circleShape;
  
  spriteBody = world-&gt;CreateBody( &amp;spriteBodyDef );
  spriteFixture = spriteBody-&gt;CreateFixture( &amp;fixtureDef );
  
  [aSprite setPhysicsBody:spriteBody];
  
  return aSprite;
  }
  </code></pre>
  
  <p>ccTouchesEnded:</p>
  
  <pre><code>- (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
  {
  
  if (mouseJoint)
  {
    for(b2Body *b = world-&gt;GetBodyList(); b; b=b-&gt;GetNext()) {
      if (b-&gt;GetUserData() != NULL) {
          CCSprite *mySprite = (CCSprite *)b-&gt;GetUserData();
          if (mySprite.tag == 1) {
              CGPoint spritePosition = mySprite.position;
              CCLOG(@"the sprite position is x:%0.2f, y:%0.2f", spritePosition.x, spritePosition.y);
          }
      }
  }        
  
  world-&gt;DestroyJoint(mouseJoint);
  mouseJoint = NULL;
  }
  }
  </code></pre>
  
  <p>Please help. I've been at it for a few days.</p>