Have character travel through wire

Hey all- does anyone know how I can modify my character controller to travel through a wire or pipe? For example: They do this in Mario odyssey: Gameplay example

you have to use spline