Download

[Solved] Need help with rotating a vector around a surface normal.

Hey Everyone,
With some super simple rotators and velocity vectors I have my characters velocity turning around the Z axis, which is 50% of the way to what I want. What I would like to do is have my character turning left and right around the surface normal rather than world Z.
This is my first time using rotators and I’m lost with the vector math. I have tried using Make Rot from Z and X combined and alone using the surface normal for Z and velocity vector for X and then combining rotators, but that doesn’t seem to be working.

This is the part that I have that works fine.
TurningTestVectors.jpg
Currently my code has my velocity turning left and right into and away from the hill. What I would like to happen in this situation is having left turn me up the hill while right turns down the hill.
Any help you guys could give would be greatly appreciated. Thanks in advance

I think you need this node:

Wow that is it exactly. I knew it was gonna be simple but not that simple :slight_smile:

Thanks so much for your help!

How do you go about retrieving the surface normal in the first place though?

The surface normal is obtained from a hit result struct by performing a trace, usually a line trace