- Home /
Two colliders triggering each other - how?
I have two GameObjects, they each have a collider and a rigidbody. Is there no way for both of them to trigger each other in OnTriggerEnter?
What happens in my case is that OnTriggerEnter only works when one of them has a rigidbody, not both.
Is there a work-around?
Answer by nightbane30 · Apr 24, 2015 at 11:41 AM
You could make a child of one of them that has the exact same collider on it with trigger enabled, then disable is tigger on the parent with the original collider. That way you can get the best of both worlds :D You just have to switch all of the collision scripts over to the child (or not if you choose to script it a different way).
Answer by lordlycastle · Apr 24, 2015 at 01:51 PM
You have to set the Is Trigger property of both collider to true; then OnTrigger methods will be called on both, otherwise OnCollision methods are called on collision.
Your answer
![](https://koobas.hobune.stream/wayback/20220613193857im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Collider with NavmeshAgent: Is it static? 0 Answers
Excluding some physics collisions 3 Answers
Avoid overlapping of random spawned prefab 3 Answers
Rigidbody behaves differently when I add a collider 5 Answers