Spring arm rotates when it isn't intended.

I’ve tried to enrich the item interaction system and change perspective using lerp function so that the transition between top-down and over-the-shoulder perspective is smooth (and vice-versa). The transition itself works correctly, but I encountered a strange issue. When the character is rotating the spring arm rotates as well even though the camera stays in the correct position. I implemented separate logic for rotating the character and the camera because I’m using tank controls (similar to old Silent Hill). I’m currently using Unreal Engine 5.5.4.

During testing I discovered three different ways to rotate the character; the mesh, the actor and by the controller. Only the mesh rotation worked so far, however character movement was unaffected by rotation (when it should be) and it’s just feels wrong to do so.

The actor rotation was promising due to bUsePawnControlRotation and bInheritYaw options however it wasn’t really useful.

Here’s the character construction function:

APlayerCharacter::APlayerCharacter()
{
PrimaryActorTick.bCanEverTick = true;
bUseControllerRotationYaw = false;

Pivot = CreateDefaultSubobject<USceneComponent>(TEXT("Pivot"));
Pivot->SetupAttachment(RootComponent);

CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
CameraBoom->SetupAttachment(RootComponent);
CameraBoom->TargetArmLength = 400.f;
CameraBoom->bUsePawnControlRotation = true;
CameraBoom->bInheritPitch = false;
CameraBoom->bInheritRoll = false;
CameraBoom->bInheritYaw = false;

Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("PlayerCamera"));
Camera->SetupAttachment(CameraBoom, USpringArmComponent::SocketName);
Camera->bUsePawnControlRotation = false;

Arrow = CreateDefaultSubobject<UArrowComponent>(TEXT("ArrowComponent"));
Arrow->SetupAttachment(RootComponent);
}

And the rotation functions:

void APlayerCharacter::RotateCharacter(const FInputActionValue& Value)
{
	if (!bCanRotate)
	{
		return;
	}

	float RotationValue = Value.Get<float>(); 
	
	if (RotationValue == 0.f) return; 
	
	float DeltaYaw = RotationValue * GetWorld()->GetDeltaSeconds() * 200.f; 
	
	FRotator NewRotation = GetActorRotation(); 
	NewRotation.Yaw += DeltaYaw; 
	
	SetActorRotation(NewRotation); 
}

void APlayerCharacter::RotateCamera(const FInputActionValue& Value)
{
if (Controller == nullptr || !bCanRotate)
{
return;
}

float RotationValue = Value.Get<float>();
float DeltaYaw = RotationValue * GetWorld()->GetDeltaSeconds() * 200.f;

FRotator NewWorldRotation = CameraBoom->GetComponentRotation();
NewWorldRotation.Yaw += DeltaYaw;

CameraBoom->SetWorldRotation(NewWorldRotation);

}

Even though the spring arm rotates with the character, the camera transition itself still works correctly. However, it seems more logical to me that the spring arm should not rotate together with the character.

So the question is: how to rotate character without rotating the spring arm, and is rotating spring arm with a character not a problem in this case? I would really appreciate any advice. If you know of better approaches for handling camera perspective transitions, or any tutorials that explain such systems, I’d be very grateful if you could share them.