I have a static body A, and a dynamic body B, and a dynamic body C. A is filtered to not collide with anything, B and C collide with each other.

I wish to create a joint between B and A. When I create a joint (ex. revolute), B no longer collides with C - C passes through it as if it does not exist.

What am I doing wrong? How can adding a joint prevent a body from colliding with another body it used to?

EDIT: I want to join B with A, and have B collide with C, but not A collide with C. In realistic terms, I'm trying to create a revolute joint between a wheel (B) and a wall (A), and have a box (C) hit the wheel and the wheel would then rotate.

EDIT: I create a the simplest revolute joint I can with these parameters (C++):

b2RevoluteJointDef def;
def.Initialize(A, B, B -> GetWorldCenter());
world -> CreateJoint(&def);

1 Answer 1


Fixture density of body B was 0, it should be a positive value.

b2FixtureDef f;
f.density = 10.f; // greater than 0
B -> CreateFixture(f);
  • \$\begingroup\$ Cheers on getting to the bottom of the issue. Perhaps you could expand this answer with some sample code demonstrating the fix? \$\endgroup\$ Sep 30, 2013 at 20:22
  • \$\begingroup\$ If you are satisfied with your own answer, you should accept it. \$\endgroup\$ Oct 4, 2013 at 13:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .