- Home /
How to disable compund colliders?
I have 'Gameobject A' which has 'Gameobject B' as child.
Both A and B have 'Rigidbody' and 'Sphere Collider' which is trigger.
But, B is still calling OnTriggerEnter of A.
I wish B would not call OnTriggerEnter of A.
Is there any solution to disable compound colliders?
Answer by MrSoad · Nov 12, 2014 at 01:16 PM
Instead of having them linked via a parent child relationship you should have them connected by a "joint", I tend to always use config joints but you may prefer one of the others depending upon what you are doing.
This will sort out your current issue and avoid possible future issues that you might get from having a rigidbody as a child of another rigidbody, something that you really should not do because it can cause some very weird behavior.
A normal compound collider setup only has one rigidbody, placed on the root object(top level parent) with colliders with NO rigidbodys on the child objects. The parent rigidbody then handles all the child colliders as one, and acts accordingly.
Your answer
Follow this Question
Related Questions
Compound collider causing violation of freeze clause 0 Answers
Compound Collider - Best Practices 1 Answer
Child collider does not trigger inside a parent collider 0 Answers
Effectors not working with compound collider? 2 Answers
Compound collider OnCollisionExit - how to find out WHICH sub-collider fired it? 4 Answers