camera error rotate After I call MoveMoveRight and UnPossess

Thanks very much,

I ref UE4 Third-person sample code to write my game, It work fine.
But I call MoveRight function then I change role(call UnPossess),
camera always changed(face to new role’s back),
How can I let camera only change once as first time, Please help me, thanks.

CameraBoom = PCIP.CreateDefaultSubobject(this, “CameraBoom”);
CameraBoom->AttachTo(RootComponent);
CameraBoom->bUseControllerViewRotation = true;
CameraBoom->bDoCollisionTest = false;

FollowCamera = PCIP.CreateDefaultSubobject(this, “FollowCamera”);
FollowCamera->AttachTo(CameraBoom, USpringArmComponent::SocketName);
FollowCamera->bUseControllerViewRotation = false;

CameraBoom->TargetArmLength = 520;
AddControllerPitchInput(20);

Solved, I forgot to clear controller rotation;

Thank you so much for giving me the hint I needed.
I didn’t realise that the Playercontroller has Transform values that would affect the camera after unpossessing.

I used this for my project:

PlayerController->SetControlRotation(FRotator(0.0f, 180.0f, 0.0f));