Camera clipping during animation

Hello everyone!
I have made a sliding mechanic in ue4,but there’s 1 issue,whenever I’m sliding under a low surface,my first person camera starts clipping trough the floor,as well as my animation, I tried fixing it by turning no collision on for the capsule collision component,but that allowed me to go trough walls while sliding,and that wasn’t what I wanted,does anyone know a solution to this issue?