UnrealEngine/UE4 - CPP
[UE4-CPP] 개인메모 PrimitiveComponent Overlap C++ 구현
에드윈H
2021. 6. 20. 15:39
헤더파일
UPROPERTY()
USphereComponent* Trigger;
UFUNCTION()
void OnOverlapBegin( class UPrimitiveComponent* selfComp, class AActor* otherActor, UPrimitiveComponent* otherComp,
int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
cpp파일
- 생성자
Trigger->OnComponentBeginOverlap.AddDynamic( this, &해당클래스::OnOverlapBegin );
void 해당클래스::OnOverlapBegin( class UPrimitiveComponent* selfComp, class AActor* otherActor, UPrimitiveComponent* otherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult )
{
UE_LOG( LogTemp, Log, TEXT("OverLap") );
}