Do two bodies connected by a hinge or slider constraint no longer undergo collisions with one another?
e.g If you have two boxes connected by a slider joint and you apply a force such that one box runs into
the other, can you make them collide?
At the moment mine just pass through each other, but once
the joint is disconnected they collide properly
Collisions and Joint Constraints
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Collisions and Joint Constraints
When you add a constraint to the dynamics world, you can specify to enable collisions between connected bodies or not, as second argument:
Have you tried setting the second argument to 'false' ?
Thanks,
Erwin
Code: Select all
virtual void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false);
Thanks,
Erwin
-
- Posts: 11
- Joined: Mon Jan 04, 2010 5:48 am
Re: Collisions and Joint Constraints
Thank you so much, that has completely fixed my simulation 
