Hi, I found it a little bit confusing to introduce more private variables in this lecture. What I have done is to not initialize the TargetYaw in the header file but instead I initialized it in the BeginPlay() method. I simply set the target yaw by taking the initial yaw and adding 90 degrees.
TargetYaw = GetOwner()->GetActorRotation().Yaw + 90.f;
My TickComponent() method has not changed:
FRotator DoorRotation = GetOwner()->GetActorRotation();
DoorRotation.Yaw = FMath::FInterpTo(DoorRotation.Yaw, TargetYaw, DeltaTime, 2);
GetOwner()->SetActorRotation(DoorRotation);