Unreal: Get horizontal angle of velocity-looking direction

I want to calculate the relative angle of the speed in relation to the direction of view:

For this I do have the "Get Control Rotation" and the "Get Velocity" of the "Pawn"

I am stuck:

Yeah I stole the original image from: https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/74282-get-angle-offset-from-forward-vector-need-help

But it explains exactly how the "angle" should be.

Positive values if the velocity is "moving to the right" relative to the looking direction and negative values if "moving left".

EDIT:

Using arctan I can compute the negative and positive angle based on the horizontal components of the vector. As I am only interested in horizontal movement and the horizontal "direction" in which my pawn is facing.

As the "forward vector" of the rotator uses a "z" component when looking up/down I figured I could use the "right vector" and rotate it -90 degress (to the left or better say front) around the "z" axis, because it never get's a "z" value.

Unfortunetly if the velocity vector has a "z" value when moving sidewards up or down the hill the angle is +270 instead of -90 and reverse:

• What format is your rotation in? May 17, 2020 at 21:25
• It's a rotator with XYZ axis May 18, 2020 at 6:55