Cover system: follow the wall direction

Hello guys.

I just made a cover system with cover boxes.Now my issue is the character cannot follow the wall direction
if he is in corner (see first pic).

Is there a way maybe with linetrace for the character to know the “where is the wall”? and he could follow it.
Thanky anyway!

  1. pic the corner situation
  2. for the limit left/right movement=stick to the wall
  3. cover box setup (arrow is for cover rotation)

I made a cover system too. And I just used one line trace to follow the wall. I am sending a trace from actor to basckwards and I move the character to the wall in event tick with move companent to node . An for rotatation I am rinterp the rotation of of character with taking the normal of the wall. But I use a more complex way to find corners. It is hard to explain how my corner detection works. But basicly I am sending 5 capsule trce from actor to walking rotation and I am making something with angle between my actor and last capsule tarces index impact point.