How to rotate Pawn to stand upright on the wall he was previously facing

Hello, I have been trying to program a character to walk on a wall. I created a line trace in front of the character and my movement works, but I can’t rotate the character properly so that it stands upright on the wall it was previously facing.

The Line Trace:

if (GetWorld()->LineTraceSingleByChannel(F1, S, E1, ECollisionChannel::ECC_Visibility, TraceParams))
{
loc = (F1.Normal * 90) + F1.Location;
//rot = rotate Pawn to stand upright on the wall he was previously facing
}