Hi, I’m trying to make it so that when the player stops free looking, it will smoothly transition back to the original rotation. So far all my other attempts have just made the player rotate to the new position, this is my current code.
void APlayerCharacter::FreeLookStart(bool EnableFreeLook){FreeLookControlRotation = FRotator(Controller->GetControlRotation().Pitch, GetActorRotation().Yaw, GetActorRotation().Roll); //Controller->GetControlRotation();bIsFreeLooking = EnableFreeLook;
if (!bIsFreeLooking)
{
if (Controller)
{
Controller->SetControlRotation(FreeLookControlRotation);
}
}
bUseControllerRotationYaw = !bIsFreeLooking;
}