I don’t know if this is because the methods I have looked up are depracated or I am simply missing something, but visual studio is telling me that the function I am trying to bind does not have the correct parameters. I have tried multiple different functions and would highly appreciate if someone pointed me in the right direction! Thank you in advance.
UFUNCTION() void OnOverlapBegin(class AActor* l_otherActor, class UPrimitiveComponent* l_otherComp, int32 l_otherBodyIndex, bool l_fromSweep, const FHitResult& l_sweepResult); // Trigger collider used to help NPC characters interact with the door UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Interactable", Meta = (AllowPrivateAccess = "true")) class UBoxComponent* m_boxTrigger = nullptr;
Implementation in Constructor:
// Create trigger box m_boxTrigger = CreateDefaultSubobject<UBoxComponent>(TEXT("TriggerCollider")); // Specify trigger collider definitions m_boxTrigger->SetupAttachment(m_objectMesh); m_boxTrigger->InitBoxExtent(FVector(100.0f, 100.0f, 100.0f)); m_boxTrigger->SetRelativeLocation(FVector(0.0f, 60.0f, 100.0f)); m_boxTrigger->SetCollisionProfileName("DoorTrigger"); m_boxTrigger->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Overlap); // Bind overlap functions m_boxTrigger->OnComponentBeginOverlap.AddDynamic(this, &ADoor::OnOverlapBegin);
The function is also defined lower down in the .cpp.