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.