For finding touch location on screen in cocos2d (ios)

F

Try This code and get touch location in cocos2d (ios)


 - (void)ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
         {
             UITouch *myTouch = [touches anyObject];
             CGPoint location = [myTouch locationInView:[myTouch view]];
             location = [[CCDirector sharedDirector] convertToGL:location];
         }

About the author

anshul.jain
By anshul.jain

Category