Get relative rotation of sphere trace impact

As the title explains, I wrote a cool little script for a wall run. But instead of magnetizing the character to the wall I was going to do a simple apply upward/forward force to the character and substitute a wall running animation.

The blueprint is done and it all works, but I’m sort of lost on how to retrieve in some relative sense, where we impacted the wall at with our sphere trace.

Ideally, this number would be an angle/radian relative to forwards and fed to the animation blueprint (in the code snippet, the variable impact location). We’d then tilt the camera/use the relative impact point to decide which direction we’re wall running on, and play that animation.

I’ll continue to experiment with different vector math operations, and I’ll post results here if I’ve found it but I could really maybe use another set of eyes right now.

So yeah, got it Imgur: The magic of the Internet

Just had to get location and relative world location, break it into rotator and extract the yaw as our impact point relative to our player.

This returns a value between -180 and 180, with zero being towards your back.