How to stop Rigidbody2D from getting stuck on corners?

I have a tiny 2D game (scaled to 16 pixels-per-unit) with a character that must be able to walk up slopes. I gave it a CapsuleCollider2D and it seems to work fine. Additionally, my level is made up of several blocks that group into a parent with a CompositeCollider2D, as shown in pic below:
158419-compositecollider.png

However, when jumping from one platform to the other, falling on the corner gets the character stuck as shown in this capture. I can walk off the platform to the right, but I can’t walk onto it to the left or even jump (which I assume just means my ground checking method is always returning false while stuck).

I’ve searched online for the solution but most people seem to fix it by changing their previously BoxCollider2D into a CapsuleCollider2D but I’m already using that. Is this a consequence of the scale of the game being too small, of using GameObjects as platforms instead of Tilemaps, of me having the wrong Rigidbody2D settings, or perhaps something else entirely?

This is a common problem with tile based games. You will notice this way clearly if you use a full tile based collider system (like 1 box collider for each tile). This has a pretty simple fix however.


1) Change the player’s collider to 4 edge colliders to form a box collider. This should fix it.

2) Change the tiles’ colliders to 4 edge colliders to form box colliders. This should also fix your issue.

Both solutions work, however you might want to use different solutions for different games. Do keep in mind though, that different edge colliders do not collide with each other.


Regards.




Edit: I was just trying to polish my character movement. I tried adding a box collider with some edge radius, this fixed the issue plus gave a better result - the edge radius made corner movement smoother.

Screen shots:
164700-edgeradius.png
164701-edgrds2.png
my drawing skills are perfect, don’t you think so