- Home /
rigidbody 2d goes through polygon collider 2D
Hello,
In my game, I have a rigidbody 2d that breaks (in several rigidbodies) apart when colliding with a polygon collider 2D. Sometimes, like 5% of the time, when the rigidbody collides on the polygon collider ground and breaks, a part goes through the polygon collider.
When it happens, it seems that the part follows a vertice like if the solver iterator was trying to fix the position by moving out the rigidbody part from a polygon block. I tried to increase max linear correction in physics 2d settings, from 0.2 to 0.4 but it didnt help. To be honest, I don't know exactly what to change in physics 2D settings because I dont see any documentation with nice examples. I also dont want to increase or decrease everything in there because my game is for mobile and performance matters.
Any clue of what I could to avoid those rigidbodies going through polygon colliders?
Note that I just tried to replace the polygon collider2d ground with a box collider and it works! But my ground must use a polygon collider since its not straight so box collider is not really an option.