Why do sprites stick to each other?

I am making a 2D platformer and I’ve run into a problem: When my character jumps into a wall and you keep him moving against it he is supposed to fall down, however, he actually sticks there and can hang indefinitely as long as you keep moving the character against the wall. I think this has something to do with friction mechanics in the physics engine. It should also be noted that the character in my game can move in the air while jumping (similar to Super Mario and other 2D platformers) so he only sticks when you’re holding the button to move him in the direction of the wall. So is this a matter of lowering friction (and how would i do that) or is this something else? Thank You!

If you are using the standard 2d character controller, you can add the Slippery material to the Box Collider 2D in walls.

If you can’t find the materials for colliders, here is the one I am using:
http://maikonfarias.com/unity/samples/Slippery.physicsMaterial2D

  • Download Slippery.physicsMaterial2D file and import to unity.
  • put it in the “Material” property of a Collider 2D for your walls.