Touches not working

Touches not working
0.0 0


So I’m not sure why, but none of my ccTouches__ functions work. I do exactly what the tutorial says to do which is…

void GameScene::ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent)
    // Choose one of the touches to work with.
    CCTouch* touch = (CCTouch*)(pTouches->anyObject());
    CCPoint location = touch->locationInView(touch->view());
    location = CCDirector::sharedDirector()->convertToGL(location);

I have this for each of the Began, Moved, and Ended.

But when I put a breakpoint inside there it doesn’t hit it.

In the init I even do this->setIsTouchEnabled(true);.

Any help?


Which platform does your code run on?


Currently programming in Xcode for iOS.


What’s GameScene?


Actually I overwrote CCLayer::onEnter with my own onEnter in the GameScene. All I needed to do was call CCLayer::onEnter(); at the beginning of it.