Add Relative Rotation "Wonky" Spring Arm

Hi! New to Unreal and 3D programming in general, so I’m sure I’m just missing something here…

I have a SpringArm + Camera (in SpringArm slot) attached to my root CapsuleComponent. In my PlayerController I have set up input so that moving the mouse/right stick up or down will update a “PitchRotation” float on my SpringArm.
Now, in the TickComponent of the SpringArm I am simply calling this method to add pitch rotation:

AddRelativeRotation(FRotator(PitchRotation.Value * DeltaTime, 0.0f, 0.0f));

This works just fine for moving my third person camera up and down.
However, as soon as I rotate my CapsuleComponent by 90° yaw in the details panel, the “up and down” movement becomes really wonky and wobbly. When printing the SpringArm’s transform, I get some tiny roll and yaw mixed in:

The faster I move the mouse, the more wobbly it appears.
Would appreciate any tips, hints or nudges in the right direction. Thank you!

Found that using

bUsePawnControlRotation

And having the SpringArm inherit the PlayerController rotation fixes this issue. Still, would be nice to know why rotating it manually causes issues.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.