Got two questions on constraints:
1) Is there any easy way to disable collision between two bodies that are connected with a constraint? Or do I have to implement a test in the btOverlapFilterCallback?
2) Is there any callback that is called when a constraint limit is reached? For example, I want to play a sound when the hinge constraint reach max or min.
Thanks in advance!
Two questions on constraints
-
- Posts: 5
- Joined: Mon Jan 31, 2011 2:45 pm
Re: Two questions on constraints
And a third one while I am at it:
3) Having set limits (for hinge) with setLimit (...), how to I turn off limits (so the constraint returns to the state it was when I created it)?
3) Having set limits (for hinge) with setLimit (...), how to I turn off limits (so the constraint returns to the state it was when I created it)?
-
- Posts: 10
- Joined: Tue Feb 01, 2011 1:49 pm
Re: Two questions on constraints
Hello!yezide wrote:Got two questions on constraints:
1) Is there any easy way to disable collision between two bodies that are connected with a constraint? Or do I have to implement a test in the btOverlapFilterCallback?
2) Is there any callback that is called when a constraint limit is reached? For example, I want to play a sound when the hinge constraint reach max or min.
Thanks in advance!
I'm also new with bullet, but I think I can help you with the first question.
When you add the constraint you do:
Code: Select all
bool disable_collision_between_linked_bodies = true;
dynamicsWorld->addConstraint(pointer_to_your_constraint, disable_collision_between_linked_bodies);
Regards,
M.
-
- Posts: 5
- Joined: Mon Jan 31, 2011 2:45 pm
Re: Two questions on constraints
Darn, that simple 
Thanks for the help!

Thanks for the help!