How to slide 2d character under obstacle?

Hello I want my character to slide under an obstacle to get past without colliding but it is not working properly. I want some steps to get my character sliding.