title: XCode Polygon Sprite Problems
body: <p>I am using the code below to try and generate a polygon shape sprite.  I am running into problems with the code, can anyone spot anything wrong with it?</p>
  
  <pre><code>   b2BodyDef woodBodyDef;
       woodBodyDef.position.Set(400/PTM_RATIO,100/PTM_RATIO);
       woodBodyDef.type = b2_dynamicBody;
       woodBodyDef.userData = _wood;
       _body = _world-&gt;CreateBody(&amp;woodBodyDef);
  
       b2PolygonShape woodShape;
  
       int num = 4;
       b2Vec2 vertices[] = {
       b2Vec2(-137.0f/PTM_RATIO,-32.5f/PTM_RATIO),
       b2Vec2(-137.0f /PTM_RATIO,36.5f/PTM_RATIO),
       b2Vec2(137.0f /PTM_RATIO,36.5f/PTM_RATIO),
       b2Vec2(136.0f /PTM_RATIO, -32.5f/PTM_RATIO)
       };
       woodShape.Set(vertices, num);
  
  
  
       b2FixtureDef woodShapeDef;
       woodShapeDef.shape = &amp;woodShape;
       woodShapeDef.density = 1.0f;
       woodShapeDef.friction = 1.0f;
       woodShapeDef.restitution = 0.5f;
       woodBodyDef.userData = _wood;
       _body = _world-&gt;CreateBody(&amp;woodBodyDef);
  </code></pre>