How do i rotate my character towards the direction it's been launched to?

Hi everyone!

I’m currently working on a game that includes a couple of parkour movements like wall running. I’ve made my wall run system work and now i’m refining it to make sure it looks good.

First of all i wanna give you some info on how i made it work so that you might have an idea of what i’m working with:

My wall run movement is dony by launching the character based on the wall that has been hit by a line trace.

My launch velocity is calculated like this:
CrossProduct(hitResult.Normal,FVector(0,0,1)) * (movementSpeed * wallRunDirection)

where wallRunDirection is 1 when i’m running on my character’s left and -1 for my character’s right.


Now to the actual reason why I’m writing this: if i start wall running while not having my camera completely straight the wall run still works but my character is slightly rotated in a weird direction, you can imagine that when running on a wall that isn’t rotated at something like 0 or 90 degrees the running might come out weird as my character might look inside or in the opposite direction of the wall. Being fairly new to UE it might even be some dumb basic question so i’m sorry if it is, but how do I rotate my character towards the direction it has been launched towards?

Hope everything is actually readable and understandable and that you’re all having an awesome day!