box2D

I downloaded the box2D addon here http://code.google.com/p/vanderlin/down-…-p&can=2&q= and I’m trying to draw a polygon and a line with gravity as the circle example does. But my polygon is static.

Does anyone know how to create a polygon with gravity, collisions, etc?

Thanks

I forgot to set polygon’s physics settings

----->poly.setPhysics(3.0, 0.53, 0.1);

  
  
ofxBox2dPolygon poly;  
  
poly.addVertex(10,19);  
poly.addVertex(60,49);  
poly.addVertex(90,79);  
poly.addVertex(180,189);  
  
poly.setPhysics(3.0, 0.53, 0.1);  
  
poly.createShape(box2d.getWorld(), 30, 30);