Guest User

Untitled

a guest
Jan 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. b2BodyDef groundBodyDef;
  2. groundBodyDef.position.Set(0, 0); // bottom-left corner
  3.  
  4.  
  5. b2Body* groundBody = world->CreateBody(&groundBodyDef);
  6.  
  7. // Define the ground box shape.
  8. b2PolygonShape groundBox;
  9.  
  10.  
  11.  
  12.  
  13. // bottom
  14. groundBox.SetAsEdge(b2Vec2(812.0/PTM_RATIO,310.0/PTM_RATIO), b2Vec2(-149.0/PTM_RATIO,310.0/PTM_RATIO));
  15. groundBody->CreateFixture(&groundBox,0);
Add Comment
Please, Sign In to add comment