Measuring Angle Relative To Rotation?

Good afternoon. I’ve exhausted all stubbornness and would be grateful if anyone could help me solve an issue which I’m having. I will try to make this as quick and clear as possible.

Below is the Blueprint which I’m using to measure the pitch and yaw angle between the player pawn and the player pawn’s velocity.

Using this blueprint, I’m able to pitch and yaw the aircraft and get an accurate measurement as seen in the example below:

Key:

  • Symbol = Player’s forward vector.

-0- Symbol = Player’s velocity vector…

Red line = Angle to be measured.

Here, the pitch angle is measured at -7°, which is correct. The value is highlighted n the debug string.

Here, the yaw angle is measured at 8°, which is correct. Once again, the value is highlighted in the debug string.

Unfortunately, my Blueprint falls apart when the roll rotation of the player pawn changes.
Here, what should be measured as pitch is still being measured as yaw and vice versa.

What I would like to know how do I go about making the pitch angle always relative to the up vector and the yaw angle relative to the right vector.

Any help would be much appreciated.

Many thanks, L.J.

Here is the answer which I was looking for:

Should mark your answer as the answer :slight_smile: