My game units have as subclass CCNode and I just add several CCSprite as children for presentation.
I use contentSize and hitAreaExpansion to select game units with touchEnded. Probably all best practise with cocos and it works fine but with trade offs.
At start I had for CCNode the default anchorPoint (0, 0). The Sprites I add have the default anchorPoint (0.5, 0.5) and position (0, 0).
If I let this values on default it's not possible to set the contentSize correct that all childs are in the area. Thats because contentSize is so fix with no offset possible...
I studied the hitTestWithWorldPos method in CCNode and it seems to me that contentSize and anchorPoint is hardly connected.
You can extend contentSize with hitAreaExpansion but it is not possible to set an offset for the hitArea. And some added childs are on the left side of the anchorPoint!
Because of that I come to the conclusion that I have to set the CCNodes anchorPoint to (0.5, 0.5). Only then I can set the contentSize that it covers all childs (in all directions).
It feels strange for me that the CCNode default anchor point is not in the middle and that it is not possible to set the hitArea more flexible.
It would be nice if someone could confirm this plz??
And if I got it right I hope you decouple the hitArea more in future releases, maybe in the swift version I like to back.