Multiple layers on Scene with touch

Multiple layers on Scene with touch
0.0 0



I have 2 different CCLayers on the same CCScene. my CCScene - HelloWorldLayer - ContentMenuLayer
The way it works now is that HelloWorldLayer receives all the Touch input and none come to ContentMenuLayer even though it is on top of HelloWorldLayer.

What do I need to do to make sure that all Layers receive touch events?
How to disable touch on the bottom Layers so only the up top layer receives all touch events ?



Have you tried setTouchEnabled(bool) ?


and is the layer registered with the TouchDispatcher and given a priority?



I made a cleanup and fixed the problem. Had a look at the SimpleGame example.
Thanks for the response anyways. Happy to see that people are active here :slight_smile: