Hi all,
this is the first time I'm using Bullet so I apologize if I've missed anything important and please let me know if that's the case.
Now to the issue. I can't get dynamic rigid bodies and static rigid bodies to collide. Only dynamic rigid bodies will collide however.
I’ve setup a btConvexHullShape for each of the bodies and I’m using a custom motionstate.
When gravity is simulated the dynamic bodies simply fall through the static ones. Why aren’t they colliding?
Thank you very much.
Here's (some of) the code:
PhysicsComponent
PhysicsSystem
Motionstate
Sceneimporter (buildCollisionShape)
Dynamic and static rigid bodies not colliding
Re: Dynamic and static rigid bodies not colliding
It's possible that the static objects have reached a sleeping state , you can try disabling sleeping on them in your PhysicsComponent as below. The default debug draw class also shades objects by activation state which may help show up errors.
if(mass == 0.0f)
{
body_->setActivationState(DISABLE_DEACTIVATION);
}
if(mass == 0.0f)
{
body_->setActivationState(DISABLE_DEACTIVATION);
}
Re: Dynamic and static rigid bodies not colliding
Unfortunately not, already tried that. Thanks though.
Re: Dynamic and static rigid bodies not colliding
Have you tried the very simple case of one dynamic body and one static body and breakpointing the broadphase collision?
Re: Dynamic and static rigid bodies not colliding
Looks like a problem with btConvexHullShape set-up, can you test standard - simple dynamic rigid-bodies like box, sphere ?adrianp wrote:Hi all,
this is the first time I'm using Bullet so I apologize if I've missed anything important and please let me know if that's the case.
Now to the issue. I can't get dynamic rigid bodies and static rigid bodies to collide. Only dynamic rigid bodies will collide however.
I’ve setup a btConvexHullShape for each of the bodies and I’m using a custom motionstate.
When gravity is simulated the dynamic bodies simply fall through the static ones. Why aren’t they colliding?
Thank you very much.
Here's (some of) the code:
PhysicsComponent
PhysicsSystem
Motionstate
Sceneimporter (buildCollisionShape)
Re: Dynamic and static rigid bodies not colliding
After many hours I realized it was "just" a scaling issue with the imported meshes.
Thanks for your suggestions though.
Thanks for your suggestions though.