Custom physic hitbox and keeping players on a line

I’m making aa 2.5D game so keeping the player on straight line is crucial. I tried wielding a cylinder onto the player to prevent weird wall bumps would make them move to the side but it doesn’t seem to be working.

Is there any other way to keep player on a line? and is there a way to make a new physic hitbox for the player to make physic related things less clonky?