There is a way to create chipmunk shape (physic body) from touches (curves)? I mean, that I can just create some shape from points, but there is a limitation to the number of vertices and the shape of the figure is angular, rather than convex. I found some info about Bezier, but it is compatible only with old version of cocos2d, but I have to find something for cocos2d V3.
Asked
Active
Viewed 189 times
0
-
I'm not sure I understand your question. Do you just want to know if there's a limit to the number of vertices that can be used to define a vector outline in cocos2d v3? – Mike 'Pomax' Kamermans Sep 16 '14 at 23:09
-
Not exactly, in fact, I need to draw shape on the touches... something like drawing with quadratic bezier curve, but only with cocos2d V3. For example if user draws some circle, I need to know any objects inside and which outside. Maybe there is more simple solution... – Kikiki Sep 17 '14 at 08:57
1 Answers
0
It works for me:
CCDrawNode *node = [CCDrawNode node];
[node drawPolyWithVerts:points count:count fillColor:[CCColor redColor] borderWidth:2 borderColor:[CCColor redColor]];
node.physicsBody = [CCPhysicsBody bodyWithPolylineFromPoints:points count:count cornerRadius:2 looped:YES];
Thanks

Kikiki
- 71
- 5