Browse Source

Actually register Box2D worlds as contact filters

Bill Meltsner 13 years ago
parent
commit
4aa3939311
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

@@ -205,6 +205,7 @@ namespace box2d
 		this->retain(); // The Box2D world holds a reference to this World.
 		world->SetAllowSleeping(true);
 		world->SetContactListener(this);
+		world->SetContactFilter(this);
 		world->SetDestructionListener(this);
 		b2BodyDef def;
 		groundBody = world->CreateBody(&def);
@@ -219,6 +220,7 @@ namespace box2d
 		this->retain();
 		world->SetAllowSleeping(sleep);
 		world->SetContactListener(this);
+		world->SetContactFilter(this);
 		world->SetDestructionListener(this);
 		b2BodyDef def;
 		groundBody = world->CreateBody(&def);