preventing collisions between connected objects

Is there something to prevent two objects that are connected from colliding with each other, but still allow them to collide with anything else.

I don’t see a property like that in the configurablejoint
Are you supposed to use Physics.IgnoreCollision?

Dan

Physics.IgnoreCollision is a great idea. It’s simple to use. Just make sure not to use tooooooo many of them; I put a few hundred into one of my games and it slowed things down. If I kept the number number under 50-100 the frames per second didn’t seem to be affected.

Just to note, if one object is the child of the other, you don’t need to use IgnoreCollision. Just make sure only the parent object has a rigidbody and its script will receive collision reports for both colliders.

andeeee, are you saying that if i have a bunch of nested gameObject like the following example shows, putting IgnoreCollision between A and B, works for A and C as well?

A
B (A’s son)
C (B’s son A’s grandson)

Kokumo

Not quite. The children, grandchildren, etc, of object A will not collide with each other as long as only the root object (A in this case) has a rigidbody component. If the child objects have rigidbodies, it will cause problems. Basically, all the colliders on child objects combine together and behave as if they were one collider attached to the root parent.

Aha!.. so, if A and C have a rigidbody and a collider each one, i must explicit IgnoreCollision between them if i don’t want to have problems.

Thanks for you guide :smile:!

PS: could someone put [Solved] at the title of this post?