The instructor replaced
float CurrentYaw = GetOwner()->GetActorRotation().Yaw;
FRotator OpenDoor(0.f, 0.f, 0.f);
OpenDoor.Yaw = FMath::Lerp(CurrentYaw, TargetYaw, 0.02);
GetOwner()->SetActorRotation(OpenDoor);
With
CurrentYaw = FMath::Lerp(CurrentYaw, TargetYaw, 0.02f);
FRotator DoorRotation = GetOwner()->GetActorRotation();
DoorRotation.Yaw = CurrentYaw;
GetOwner()->SetActorRotation(DoorRotation);
I’m just wondering how these are different in the way they go about opening the door. Both compile and work.