First i have scaled the layer larger which contains the sprites. Now I need to sense touch on a sprite. I have tried as follows, but cant reach to goal-
CGRect tRect= [[aSprite displayedFrame] rect];
if(CGRectContainsPoint(tRect, touchedPosition))
{
NSLog(@"touched:>> touch at (%f,%f)",touchedPosition.x,touchedPosition.y);
// Do something, maybe return kEventHandled;
}
else{
NSLog(@"NOT touched: touch at (%f,%f)",touchedPosition.x,touchedPosition.y);
}
FYI: I have used cocos2d framework