Change camera pivot on collision.

Hi,
i am new in UE
i am trying to change the camera pivot when the camera hit a wall or something.
and trying to make it rotate around character smoothly.
i use the basic example in UE4.
the problem occur because i changed the camera position at the right back of the character ,instead that at his center.
and now when i am around a wall and rotate the camera. the pivot change but not as i expected.