Perhaps I’m doing something wrong, but I’ve read in a number of places to get touch working on a layer you need to call setTouchEnabled(true) in the layer’s init() method. Then override ccTouchBegan() and any others you needs. I have done both of these but ccTouchBegan() is never called.
I can only get it to work by also adding the layer to the touch dispatcher like this (after calling setTouchEnabled in init()).
CCDirector::getInstance()->getTouchDispatcher()->addTargetedDelegate(this, 0, true);
I was under the impression that setTouchEnabled should be enough and the layer should be added automatically to the touch dispatcher for you?