Rigidbody2D character movement problem

Hello everyone! I just started to make a platformer game, but I already got a problem with the character movement. I use rigidbody2D, alter it’s velocity for horizontal movement, and use the AddForce method to jump. My problem is, that the character gets stuck on the walls, if I move it horizontally in the air. Could someone let me know, how should I get rid of this problem? Thanks for the answers!

I really don’t know what type of collider you are using, but

  1. You can try use Circle Collider 2d or Capsule Collider in the place when your character has collisions with the walls.
    Something looks like on this image
    early collision above character controller - Unity Answers
    Unity - Manual: Capsule Collider component reference
  2. You can change a Friction parameter in settings of material Unity - Manual: Physics Material 2D