Browse Source

Actually create groundBody when creating a World with gravity (i.e. all the time)

--HG--
branch : box2d-update
Bill Meltsner 14 years ago
parent
commit
542ae2f736
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/modules/physics/box2d/World.cpp

+ 2 - 0
src/modules/physics/box2d/World.cpp

@@ -133,6 +133,8 @@ namespace box2d
 		world = new b2World(Physics::scaleDown(gravity));
 		world->SetAllowSleeping(sleep);
 		world->SetContactListener(this);
+		b2BodyDef def;
+		groundBody = world->CreateBody(&def);
 	}
 
 	World::~World()