- Home /
Unity 2D player sticks on platform corners
Update: 2D Capsule colliders are coming in a future 5.x update. Keep your eyes peeled to the roadmap for more info https://unity3d.com/unity/roadmap
When my Unity 2D player (with a circle and box collider) jumps into a platforms corner at just the right angle. The player sticks in the corner as long as you keep applying forward force. This bug has been present in Unity for a long time and can be seen in Unity's official 2D platformer character tutorial if you jump into a platform at just the right angle. There must be a way around this bug, but I've been searching for a few months and haven't been able to find any good leads to fix it.
Video example demonstrating bug: https://www.dropbox.com/s/dmrbt8a0u9ufgn9/LedgeStickBug.mov?dl=0
Images with more details:
hello @Ash Blue,
I think you can solve this by using box collider instade of circle collider.
The problem with a box collider solution is the player will stick to corners and uneven terrain. $$anonymous$$aking it a solution I wish I could use.
Answer by KoJix · May 19, 2015 at 06:46 AM
I believe this can be fixed with a physics2D object.
If you change the friction to 0, or just play around with the value.
Actually I tried that. Setting the friction to 0 actually doesn't do anything. From what I understand the issue seems to originate in box 2d's core. Since the circle is wedged between two corners, the physics resolution seems to be confused and trying to push it in two opposite directions. Causing a ghostlike square to wrap the circle.
Answer by mr_noodler · Aug 01, 2020 at 08:32 PM
I have this same problem @Ash-Blue
Please follow me on twitter:) https://twitter.com/NoodlerMr
Your answer
Follow this Question
Related Questions
Character animation jerks when moving 1 Answer
2D Platformer queries 1 Answer
Using animated transform to push object away? 2D 0 Answers
2D Detect collisions of a 2D block only on left/right (not top/bottom) 0 Answers
How can I make an object stop all momentum and hold it's position in air? 1 Answer