hi,
I am new to box2d.(using cocos2d box2d application)
I am drawing lines in cctouchmoved. I want to perform some action when current line has touched any previously drawn lines.
this is the box2d code for line
b2BodyDef bd;
bd.type = b2_staticBody;
bd.position.Set(0, 0);
b2Body* body = world->CreateBody(&bd);
b2PolygonShape shape;
shape.SetAsEdge(b2Vec2(start.x, start.y), b2Vec2(end.x, end.y));
_lineFixture = body->CreateFixture(&shape,0.0f);
I am new to box2d.(using cocos2d box2d application)
I am drawing lines in cctouchmoved. I want to perform some action when current line has touched any previously drawn lines.
this is the box2d code for line
b2BodyDef bd;
bd.type = b2_staticBody;
bd.position.Set(0, 0);
b2Body* body = world->CreateBody(&bd);
b2PolygonShape shape;
shape.SetAsEdge(b2Vec2(start.x, start.y), b2Vec2(end.x, end.y));
_lineFixture = body->CreateFixture(&shape,0.0f);