0
votes

I am trying to draw the texture with polygon shape. What is the logic and how will i draw texture in polygon shape with dynamically?

I am working on cutting the rectangle, going to apply the texture in sliced shape(it may any shape).

Can any one assist me?

2

2 Answers

0
votes

Don't think you can achieve it only using cocos2d classes. You need to draw with openGL. You already have polygon vertices, triangulate your polygon(here is an example) and set your texture to draw it.

0
votes

You can also use LevelHelper (unfortunatelly - not free :( ) which has a built-in cutting engine : link