Get SpringArmComponent relative rotation no longer works

Hi,

So according to this thread, the SpringArmComponent is no longer changing relative rotation when moving around the target (like the Character in a TPP setup).

The GetControlRotation() and the GetBaseAimRotation() on the Pawn are all returning rotation in world space, which is not what I’m after.

Does anyone know an easy way to get the relative rotation of an attached SpringArmComponent?

Hey, I’m a newbie to unreal, but doesn’t “Get relative rotation” work for you?

I used this successfully in my blueprints. I.E.:

Hope this helps. :slight_smile:

Hi @EU_Coxis , thanks for your input!

Which engine version are you using? I am using 4.18 (sorry, forgot to mention in the original post), and according to the answerhub page I have linked, the SpringArmComponent’s behavior has been changed and the GetRelativeRotation() method returns a zero rotator by design.

From the answerhub by Natalia form Epic:

Which is fine, but it broke everything that was relying on the relative rotation of the SpringArmComponent.

How can I get the relative rotation of a SpringArmComponent relative to the parent.?

Hey @Kontur , sorry for the late response. Apparently they need to approve my first few posts on the forums.

I am also using UE 4.18 and the “get relative rotation” works for me. I made 2 videos for you to see how that works for me. The first one is my blueprint setup, in which you can see how I use that relative rotation to turn my character if the 3rd person spring arm is exceeding my 134 degrees threshold to the left or right of the character.

In the second video, you’re able to see the actual output of that rotation of the 3rd person spring arm relative to my character capsule, whatever it’s world rotation is. :slight_smile:

https://www.youtube.com/watch?v=AdvcnDlhoSw

Hope this helps you in your endeavour. :slight_smile:

Thanks again, @EU_Coxis !

I have created a fresh TP Template project, opened the CharacterBP and printed the relative rotation of the spring arm each tick. As you can see it returns a zero rotator:


Indeed I would expect it to print out the rotation as you have described and demonstrated in the video. My setup was utilizing the relative rotation of the spring arm (for rotating the character’s head), but now it is broken.

A bug report was made on the issue (link in op), but according to Epic, it is not a bug, but the new intended behavior.

But considering that you are on 4.18 as well, this is rather confusing. Could you please possibly confirm if the same setup as above produces different result for you?

Thanks for your help!

Hmmm, I get the same result as you.

However, I found out that it worked for me in the previous videos, because, I’m not using the “use pawn control rotation” on it and rotate it by input values. So I made the same in the fresh template and it works as well. :slight_smile:

Yep, manually rotating the camera based on the input has resolved the issue!

Thank you very much @EU_Coxis, this was driving me and my character’s head crazy!

Glad this helped! :smiley:

This does not work for me…with this solution I can not turn my character using wasd :frowning: because Camera stays behind player 100%

AND

btw Linetrace from camera isnt possible anymore q.q because you can not get its rotation with the old boom

Well, this is far from a complete solution, but a hint to make it work. You’ll need to work your way around based on what your needs from it are. :slight_smile: