2d Sidescroll problem with wall sliding

So I’m currently making a 2d sidescroll and I found a problem, my character remained “stuck” with a vertical wall when I jumped to it and was not sliding down to the floor. I looked up on the internet and “fixed” it by using physics 2d material and now the character slid, but now as the material affects the whole collider, the character slides in the whole platform, not only in the sides. So I used two box colliders, one for the upper part of the platform, and other that occupies the rest of the platform, but that ended with my character getting stuck in the corner of the platforms (I did the same but with the character). So my question is: There is way to affect only some sides of a collider (box collider 2d) with a physics material? Or there is a way to fix my problem by code, such as “behaviorWithWalls”?

Don’t know if relevant but I’m using rigidbody2d.velocity to move my character and making it jump.

If you’re using raycast functions for your player to detect collisions within 2d space, like raycasting above and below him to detect colliders then the common problem would be that you need to also have raycast not only check above and below the player for collisions, but also left and right. If its because he is getting stuck on “corners” or objects with box colliders have the raycast check at an angle in the direction he’s moving. Like after you jump while moving forward and hes falling, the raycast needs to check the combination of his forward vector and his downward vector. You can do this by usind a For Loop with a Lerp amount on a Vector 3. Or else he will get stuck on box collider corners. If I read your op wrong, im sry try this tutorial

use this tutorial. The Deranged Hermit's Devlog: 2D Platformer Collision Detection with Raycasts, Part 1: Gravity