Disable a particular object-object collision

Post Reply
hearsedriver
Posts: 10
Joined: Thu Nov 06, 2008 8:19 pm

Disable a particular object-object collision

Post by hearsedriver »

Hey there,

I have two btRigidBodies which shall interact with the rest of the physics world, but not with each other. For the combination of these two particular objects, I want to disable collision testing because it eventually leads to calling the gContactAddedCallback (and whatever happens on Bullet-side before) much more often than I need it.

What's the best way to do this with Bullet?

Thanks
hd
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Disable a particular object-object collision

Post by Erwin Coumans »

There are several ways to filter out collisions between particular objects.

See custom collision filtering in this wiki article:
http://www.bulletphysics.com/mediawiki- ... _Filtering

Do you have any idea why the gContactAddedCallback is called so often?
Thanks,
Erwin
hearsedriver
Posts: 10
Joined: Thu Nov 06, 2008 8:19 pm

Re: Disable a particular object-object collision

Post by hearsedriver »

Erwin Coumans wrote:Do you have any idea why the gContactAddedCallback is called so often?
Yes, I do. I have an object which I move manually along another object, like a train on rails, and I do not want to interact train and rails but train with all other objects and rails with all other objects.

I will have a look at the Wiki page, thank you very much.

hd
Francescu
Posts: 5
Joined: Tue Apr 07, 2009 6:53 pm

Re: Disable a particular object-object collision

Post by Francescu »

Erwin Coumans wrote:There are several ways to filter out collisions between particular objects.

See custom collision filtering in this wiki article:
http://www.bulletphysics.com/mediawiki- ... _Filtering

Do you have any idea why the gContactAddedCallback is called so often?
Thanks,
Erwin
Hi,

Is it possible to reset the group / mask collision filtering for a rigidbody once it has already been added to the world?

Thanks

--Frank
Post Reply