title: cocos2d CCSprite not getting coordinates
body: <p><strong>SOLVED!</strong></p>
  
  <p><strong>to get coordinates of the sprites frame use sprite.boundingBox.origin.x;</strong></p>
  
  <p>Hello!<br>I am implementing a simple code but I cannot understand its behavior:</p>
  
  <pre><code>anewSprite = [CCSprite spriteWithFile:@"grossini.png"];
  anewSprite.position = ccp(80, 80);
  [self addChild:anewSprite];
  
  
  anotherSprite = [CCSprite spriteWithFile:@"grossini.png"];
  anotherSprite.position = ccp(300, 80);
  [self addChild:anotherSprite];
  
  
  
  -(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
      CGPoint point= [touch locationInView:[touch view]];
      point = [[CCDirector sharedDirector] convertToGL: point];
  
      NSLog(@"point x:%f y:%f", point.x, point.y);
      if (CGRectContainsPoint(anewSprite.textureRect, point)){
          NSLog(@"contains point");
      } else {
          NSLog(@"does not contain");
      }
      return  TRUE;
  }
  
  
  
  -(void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event{
      CGPoint point= [touch locationInView:[touch view]];
      point = [[CCDirector sharedDirector] convertToGL: point];
  
      anewSprite.position = point;
      if (CGRectContainsRect(anewSprite.textureRect, anotherSprite.textureRect) == TRUE) {
          NSLog(@"Intersects");
      }
  }
  </code></pre>
  
  <p>The problem is following:</p>
  
  <p><code>NSLog(@"anotherSpriteTextureRectOrigin X:%f Y:%f", enemy1.textureRect.origin.x, enemy1.textureRect.origin.y);</code> <br>
  <code>NSLog(@"anewSpriteTextureRectOrigin X:%f Y:%f", anewSprite.textureRect.origin.x, anewSprite.textureRect.origin.y);</code></p>
  
  <p>shows: <br>
  anotherSpriteTextureRectOrigin X:0.000000 Y:0.000000 <br>
  anewSpriteTextureRectOrigin X:0.000000 Y:0.000000 <br></p>
  
  <p>Thanks in advance!</p>