Need help with cover system

OK so. Im making this pretty basic cover system which involves a line trace. When the trace hits something the camera gets pulled back so you can see more. What I need to do now is find a way to make the character (3rd person) move along the wall independently of the camera position, and to detach him from the wall when the player inputs a move control away from it.
Any little help would be much appreciated