Your function CheckForInteractable is hiding the prompt unconditionally, then the trace is showing it again, so those constant calls are normal, you have a bit of a logic issue there.
The logic should be more like this :
void APlayerCharacter::CheckForInteractable()
{
LineTrace(HitResult, ...);
AActor* HitActor = HitResult.GetActor();
// If nothing changed, do nothing
if (HitActor == CurrentInteractableActor)
return;
// Else, we are not looking at the shown actor anymore
if (CurrentInteractableActor)
{
IInterface::Execute_HidePrompt(CurrentInteractableActor);
CurrentInteractableActor = nullptr;
}
// Are we looking at something interactable
if (HitActor && HitActor->Implements<UInterface>())
{
CurrentInteractableActor = HitActor;
IInterface::Execute_ShowPrompt(CurrentInteractableActor);
}
}
Regarding the crash, I don’t know, depends on your code.
Are you calling back to Character->Interact from the interactable actor ?
Otherwise, the crash stack trace should help figure out what is looping.