How do I trigger an Interface Function of a Blueprint from a C++ class?

I’ve gotten it this far…



void APortsmouthCharacter::Interact()
{
	APlayerController* PController = GetWorld()->GetFirstPlayerController();
	FHitResult InteractHit;
	FString Debug = "Interact Event Pressed";
	UKismetSystemLibrary::PrintString(GetWorld(), Debug, true, false, FLinearColor((1.0f), (0.0f), (0.0f), (1.0f)), (3.0f));
	// Line Trace to see what Object the Player is looking at
	APortsmouthCharacter::TraceForward(PController, InteractHit, InteractDistance);
	if (InteractHit.Actor != NULL) 
	{
		const AActor* InActor = InteractHit.GetActor();
		FString DebugActor = (InActor != NULL) ? InActor->GetName() : FString(TEXT("None"));
		UKismetSystemLibrary::PrintString(GetWorld(), DebugActor, true, false, FLinearColor((1.0f), (1.0f), (0.0f), (1.0f)), (3.0f));
		if (InActor->GetActorClass()->ImplementsInterface(UInteractInterface::StaticClass())) 
		{
			FString DebugTest = "Actor Implements Interact Interface";
			UKismetSystemLibrary::PrintString(GetWorld(), DebugTest, true, false, FLinearColor((1.0f), (0.0f), (0.0f), (1.0f)), (3.0f));
		}
	}
}

I figured it out… with a little help from these Youtube videos:

and this line of code is what made everything work


IInteractInterface::Execute_Interact(InActor);

I also had to remove the const from AActor* InActor