Jelajahi Sumber

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

--HG--
branch : box2d-update
Bill Meltsner 14 tahun lalu
induk
melakukan
542ae2f736
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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()