There are a number of ways you can get around this depending on your situation.
If all the walls are vertical and it is never the intention for the circle to hit the wall then you can set up contact filtering using the catergoryBits and maskBits on the FixtureDef.filter to filter out any collisions between the circle and walls.
If the circle should be able to sometimes hit the wall except for when it hits it side-on then you can manually filter the contact in beginContact by measuring the delta between the center of the circle and the contact point. If this delta is small, then ignore the contact (which you can do by calling setEnabled(false)).
And example of the latter may look something like this (this is in Java, I don't know what language you're using but it should be trivial to port);
world.setContactListener(new ContactListener() { private Body tryGet(Body body, String bodyUserData) { return body.getUserData() != null && body.getUserData().equals(bodyUserData) ? body : null; } private Body tryGet(Contact contact, String bodyUserData) { Body body = tryGet(contact.getFixtureA().getBody(), bodyUserData); return body != null ? body : tryGet(contact.getFixtureB().getBody(), bodyUserData); } @Override public void beginContact(Contact contact) { torsoCollided |= tryGet(contact, "torso") != null; Body feetBody = tryGet(contact, "feet"); if (feetBody != null) { WorldManifold manifold = contact.getWorldManifold(); // Should really check numPoints here to see how many contact points float contactY = manifold.getPoints()[0].y; float bodyY = feetBody.getWorldCenter().y; // If difference in the vertical is small then the circle (feet) hit the wall // side on, which is impossible if the torso is wider and the torso can't rotate boolean isValidCircleContact = Math.abs(contactY - bodyY) > 0.001f; feetCollided |= isValidCircleContact; contact.setEnabled(isValidCircleContact); } } @Override public void endContact(Contact contact) { contact.setEnabled(true); } @Override public void preSolve(Contact contact, Manifold oldManifold) { } @Override public void postSolve(Contact contact, ContactImpulse impulse) { } });
The above assumes there being user data on the box set to "torso" and to "feet" on the circle, torsoCollided and bodyCollided are fields cleared to false before calling world.step on every iteration which you may or may not have any use for.