- Home /
Only one collider trigger on same prefab collision
I have a strange problem with collisions, that sometimes only one collider will actually trigger.
The setup- I created a prefab, with two different circleColliders2d, centered around 0,0. The code is set so that when the large circle meets the small circle, an OnTriggerEnter2D event is fired. When moving two instances of the prefabs towards one another, they both trigger the event at the same time.
I encountered that when I move one of the instances around the other, an edge case can occur where one of the large circles trigger the event, but the other do not.
This is contrary to my expectation that if one large circle meets a small one, the other small one will meet the large one.
Does anyone knows why it happens, or how to fix it? (I've managed to reproduce the bug multiple times)
Your answer
Follow this Question
Related Questions
Unity 2D Collider did not create any collision shapes as they all failed verification 0 Answers
Refreshing the Polygon Collider (2D) upon sprite change? 1 Answer
Flipping object with Box Collider while on an angled collider 0 Answers
Platform Collider Not Working When Enemy Collides With It 1 Answer
2D Isometric (2018.3b) - Collider 0 Answers