Garibalde wrote:
For example i have a series of objects A, B and C
I want B not to collide with A and C, But everything else, I also want A and C to collide together.
Well, for 3 objects I think you have to use collision flags manually (*).
Anyway I don't understand what kind of rope you are making: why do you need sphere shapes? A single capsule shape should be enough to cover all the roughness of the edges of the rope chunks (you can make the spheres INSIDE the capsule rope chunks match perfectly by overlapping them in the correct way). Isn't this enough for your purpose?
(*) Actually the "avoid collisions in constraint" mechanism seems work like this:
Code:
void btDiscreteDynamicsWorld::addConstraint(btTypedConstraint* constraint,bool disableCollisionsBetweenLinkedBodies)
{
m_constraints.push_back(constraint);
if (disableCollisionsBetweenLinkedBodies)
{
constraint->getRigidBodyA().addConstraintRef(constraint);
constraint->getRigidBodyB().addConstraintRef(constraint);
}
}
So it seems that rigid bodies stores the constraints between the bodies they don't want to collide with. Maybe you can try to tweak this behavior to your advantage.