Gargo
Gargo

Reputation: 1370

Cocos2d. CCMenuItem with custom touchable region?

For example, in my case every button look likes a hex. Hex pictures on these buttons can't intersect but their rects can.

Upvotes: 0

Views: 410

Answers (2)

sdabet
sdabet

Reputation: 18670

You can use the new activeArea property of CCMenuItem to define your custom touchable region: see this article

Upvotes: 2

Guru
Guru

Reputation: 22042

You can use CGMutablePathRef to make non-rectangular sprite collision detection. use this in CCMenuItem. It works...See my answer in this post:Custom touch detection

Upvotes: 1

Related Questions