diff --git a/testbed/index.ts b/testbed/index.ts index 07d25a04..0136491c 100644 --- a/testbed/index.ts +++ b/testbed/index.ts @@ -55,14 +55,11 @@ function findBody(world: World, point: Point) { let body: Body | null = null; const aabb = new AABB(point, point); world.queryAABB(aabb, (fixture: Fixture) => { - if (body) { - return false; - } if (!fixture.getBody().isDynamic() || !fixture.testPoint(point)) { - return false; + return true; } body = fixture.getBody(); - return true; + return false; }); return body; }