- Home /
Enable a Trigger Overlapping another trigger doesn't cause OnTriggerEnter or OnTriggerStay
I have two gameObjects both having a child gameObject with trigger collider and kinematic rigidbody attached. Their colliders are initially disabled. If I enable the collider component before they overlap with each other, then when they overlap, OnTriggerEnter() and OnTriggerStay() will be called correctly. However, if I enable them after they overlap with each other, neither OnTriggerEnter() nor OnTriggerExit() will be called.
Is there any necessary process I should do before enable the colliders so the problem could be solved?
Thanks.
Answer by Nick4 · Jun 17, 2014 at 06:22 AM
I don't think so. Those colliders never collide in the first place, they just overlap which is not detected because colliders only detect collisions that occurs during runtime.
Thanks for answering. So we don't have any way to solve this problem?
Answer by jbrother_unity · Jun 05 at 02:34 PM
I know this post is 8 years old but if anyone comes across this, instead of using a box collider you can make your own boxes using the Rect class and then check if its overlapping some object with an Overlaps call
Your answer
![](https://koobas.hobune.stream/wayback/20220613151736im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
C# Check if Collider2D[] Doesn't contain Scripted GameObject 1 Answer
Unity Colliders are Overlapping/Intersecting 2 Answers
Objects overlapping at origin (0,0,0) (question about OverlapSphere?) 0 Answers
How do I keep enemies from overlapping 1 Answer
How come certain Children don't cast an Overlapsphere? 1 Answer