Smooth movement inside tube?

I’ve been trying to solve this for a week.What I’d like to achieve is for my character to be able to freely move inside tube. So far, what I have is the character always aligning with the closest point on the tube. However when I try to move it around (applying force to the left/right side of the capsule as opposed to towards its forward direction) it keeps hitting the side of tube which results in choppy movemet.
Any help would be appreciated.