21 FTriggerData(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
22 bool bFromSweep,
const FHitResult& SweepResult)
23 : OverlappedComp(OverlappedComp)
24 , OtherActor(OtherActor)
25 , OtherComp(OtherComp)
26 , OtherBodyIndex(OtherBodyIndex)
27 , bFromSweep(bFromSweep)
28 , SweepResult(SweepResult)
33 FTriggerData(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
34 : OverlappedComp(OverlappedComp)
35 , OtherActor(OtherActor)
36 , OtherComp(OtherComp)
37 , OtherBodyIndex(OtherBodyIndex)
42 UPROPERTY(BlueprintReadOnly)
43 UPrimitiveComponent* OverlappedComp =
nullptr;
45 UPROPERTY(BlueprintReadOnly)
46 AActor* OtherActor =
nullptr;
48 UPROPERTY(BlueprintReadOnly)
49 UPrimitiveComponent* OtherComp =
nullptr;
51 UPROPERTY(BlueprintReadOnly)
52 int32 OtherBodyIndex = 0;
54 UPROPERTY(BlueprintReadOnly)
55 bool bFromSweep =
false;
57 UPROPERTY(BlueprintReadOnly)
58 FHitResult SweepResult;
75 virtual void OnRegister()
override;
76 virtual void BeginDestroy()
override;
78 UFUNCTION(BlueprintCallable, BlueprintPure)
79 FORCEINLINE USphereComponent* GetInnerZoneComponent() {
return InnerZoneComponent; }
81 UFUNCTION(BlueprintCallable, BlueprintPure)
82 FORCEINLINE USphereComponent* GetOuterZoneComponent() {
return OuterZoneComponent; }
85 virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;
92 void SetupZone(USphereComponent* ZoneComponent,
const float ZoneSize,
const FColor ZoneColor)
const;
93 void SetTriggerZoneSize(USphereComponent* ZoneComponent,
const float NewZoneSize);
98 void OnActorEnterInnerZone(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
100 void OnActorExitInnerZone(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
104 void OnActorEnterOuterZone(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
106 void OnActorExitOuterZone(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
110 USphereComponent* InnerZoneComponent;
112 USphereComponent* OuterZoneComponent;
116 UPROPERTY(EditAnywhere , Category =
"Zone Settings", meta = (ClampMin =
"0.1"))
118 UPROPERTY(EditAnywhere , Category = "Zone Settings", meta = (ClampMin = "0.1"))
123 TArray<AActor*> PlayersInInnerZone;
125 TArray<AActor*> PlayersInOuterZone;