mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Actually register Box2D worlds as contact filters
This commit is contained in:
@@ -205,6 +205,7 @@ namespace box2d
|
|||||||
this->retain(); // The Box2D world holds a reference to this World.
|
this->retain(); // The Box2D world holds a reference to this World.
|
||||||
world->SetAllowSleeping(true);
|
world->SetAllowSleeping(true);
|
||||||
world->SetContactListener(this);
|
world->SetContactListener(this);
|
||||||
|
world->SetContactFilter(this);
|
||||||
world->SetDestructionListener(this);
|
world->SetDestructionListener(this);
|
||||||
b2BodyDef def;
|
b2BodyDef def;
|
||||||
groundBody = world->CreateBody(&def);
|
groundBody = world->CreateBody(&def);
|
||||||
@@ -219,6 +220,7 @@ namespace box2d
|
|||||||
this->retain();
|
this->retain();
|
||||||
world->SetAllowSleeping(sleep);
|
world->SetAllowSleeping(sleep);
|
||||||
world->SetContactListener(this);
|
world->SetContactListener(this);
|
||||||
|
world->SetContactFilter(this);
|
||||||
world->SetDestructionListener(this);
|
world->SetDestructionListener(this);
|
||||||
b2BodyDef def;
|
b2BodyDef def;
|
||||||
groundBody = world->CreateBody(&def);
|
groundBody = world->CreateBody(&def);
|
||||||
|
|||||||
Reference in New Issue
Block a user