// Fill out your copyright notice in the Description page of Project Settings.


#include "InteractionSystem/InteractableInterface.h"

// Add default functionality here for any IInteractableInterface functions that are not pure virtual.

FInteractionInfos IInteractableInterface::GetInteractionInfos_Implementation() const
{
    FInteractionInfos Infos;

    Infos.ActionName = FText::FromString("Use");
    if (const AActor* SelfActor = Cast<AActor>(this))
    {
        Infos.WorldLocation = SelfActor->GetActorLocation();
        SelfActor->GetComponents<UPrimitiveComponent>(Infos.OutlineComponents);
    }
    else if (const USceneComponent* SelfComponent = Cast<USceneComponent>(this))
    {
        Infos.WorldLocation = SelfComponent->GetComponentLocation();
    }
    return Infos;
}
