- Home /
problem solving ghost vertices with trigger and collision colliders
HI.
I have bricks aligned one next to the other like a wall. When a ball hits a brick (each one has a box collider 2D), everything is fine except when the collision happens between 2 bricks, I get unexpected bounces. After many searches, it appears that it is because the physic engine does not take into account the fact that there are 2 boxColliders side by side. (Unity response here). Now to workaround this, I use a big collider that includes all the bricks in a same row. This way all the bounces are fine. Now I need to know which brick is hit so I use a trigger on each one but it doesn't work unless I remove the large collider. I have set the bricks on a different collision layer than the big collider object. Also worth mentioning, each trigger box is positioned in a way than the ball passes thru the trigger before hitting the large boxCollider.
Your answer
Follow this Question
Related Questions
double collision detection in breakout game 1 Answer
Performance of player detection: Colliders/Triggers vs OverlapCircle 2 Answers
How to enable passing through collider if speed is high enough at collision point 0 Answers
2D Raycasts Only Work in Certain Directions 0 Answers
Physics2D.Linecast ignoring walls 1 Answer