Cannot rotate SpringArmComponent with bUsePawnControlRotation enabled

Hi all,

As the title says, I need to have bUsePawnControlRotation enabled in order to make what I’m trying to do work.

However, I need my spring arm to be at an angle of 30 degrees initially but allow the player to adjust this.

I’ve seen that enabling bUsePawnControlRotation on the spring arm disables the use of SetRelativeRotation. However, the threads do not actually answer what I need to be done.

Is it possible for me to rotate the actual spring arm (USpringArmComponent) but also have bUsePawnControlRotation?

Thanks!

1 Like

Why not just set the control rotation?

Either I’m not using it correctly or it just plain isn’t working as I’d expect… Would you be able to tell me how it should be used to control the SpringArmComponent directly?

My suggestion is what @Natalo77 said. Just use the control rotation. Here’s the step-by-step:

  1. Set up an Axis input in the Project Settings (let’s call it “RotateCamera”)
  2. In your PlayerController, bind that input to a function (let’s call this function void RotateCamera(float value), for simplicity
  3. Setup your RotateCamera() function to pass that value into the AddYawInput() function

Example:

void AMyPlayerController::RotateCamera(float value)
{
	AddYawInput(value);
}