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?
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.
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?
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.