Dual-zone trigger component for player detection.
More...
#include <TriggerZone.h>
|
| | UTriggerZone () |
| | Initializes the trigger zone component.
|
| |
| virtual void | OnRegister () override |
| | Configures zones when component is registered.
|
| |
| virtual void | BeginDestroy () override |
| | Cleans up component before destruction.
|
| |
|
FORCEINLINE USphereComponent * | GetInnerZoneComponent () |
| |
|
FORCEINLINE USphereComponent * | GetOuterZoneComponent () |
| |
|
| void | SetupZone (USphereComponent *ZoneComponent, const float ZoneSize, const FColor ZoneColor) const |
| | Configures a sphere zone with collision and visual properties.
|
| |
| void | SetTriggerZoneSize (USphereComponent *ZoneComponent, const float NewZoneSize) |
| | Updates the radius of a trigger zone.
|
| |
| void | OnActorEnterInnerZone (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult) |
| | Handles player entering the inner trigger zone.
|
| |
| void | OnActorExitInnerZone (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex) |
| | Handles player leaving the inner trigger zone.
|
| |
| void | OnActorEnterOuterZone (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult) |
| | Outer zone.
|
| |
| void | OnActorExitOuterZone (UPrimitiveComponent *OverlappedComponent, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex) |
| | Handles player leaving the outer trigger zone.
|
| |
|
|
USphereComponent * | InnerZoneComponent |
| |
|
USphereComponent * | OuterZoneComponent |
| |
| float | InnerZoneSize |
| |
|
float | OuterZoneSize |
| |
|
TArray< AActor * > | PlayersInInnerZone |
| | Player tracking.
|
| |
|
TArray< AActor * > | PlayersInOuterZone |
| |
Dual-zone trigger component for player detection.
Manages inner and outer spherical trigger zones with player tracking and event broadcasting
◆ UTriggerZone()
| UTriggerZone::UTriggerZone |
( |
| ) |
|
Initializes the trigger zone component.
Sets up inner and outer sphere components with collision callbacks
◆ BeginDestroy()
| void UTriggerZone::BeginDestroy |
( |
| ) |
|
|
overridevirtual |
Cleans up component before destruction.
Removes collision event bindings to prevent crashes
◆ OnActorEnterInnerZone()
| void UTriggerZone::OnActorEnterInnerZone |
( |
UPrimitiveComponent * | OverlappedComp, |
|
|
AActor * | OtherActor, |
|
|
UPrimitiveComponent * | OtherComp, |
|
|
int32 | OtherBodyIndex, |
|
|
bool | bFromSweep, |
|
|
const FHitResult & | SweepResult ) |
|
protected |
Handles player entering the inner trigger zone.
EVENT CALLBACKS //////// Inner zone
Tracks players and notifies listeners about inner zone entry events
- Parameters
-
| OverlappedComp | The component that was overlapped |
| OtherActor | The actor that entered the zone |
| OtherComp | The component of the entering actor |
| OtherBodyIndex | Body index of the collision |
| bFromSweep | Whether this was from a sweep operation |
| SweepResult | Hit result from sweep if applicable |
◆ OnActorEnterOuterZone()
| void UTriggerZone::OnActorEnterOuterZone |
( |
UPrimitiveComponent * | OverlappedComp, |
|
|
AActor * | OtherActor, |
|
|
UPrimitiveComponent * | OtherComp, |
|
|
int32 | OtherBodyIndex, |
|
|
bool | bFromSweep, |
|
|
const FHitResult & | SweepResult ) |
|
protected |
Outer zone.
Handles player entering the outer trigger zone.
Tracks players and notifies listeners about outer zone entry events
- Parameters
-
| OverlappedComp | The component that was overlapped |
| OtherActor | The actor that entered the zone |
| OtherComp | The component of the entering actor |
| OtherBodyIndex | Body index of the collision |
| bFromSweep | Whether this was from a sweep operation |
| SweepResult | Hit result from sweep if applicable |
◆ OnActorExitInnerZone()
| void UTriggerZone::OnActorExitInnerZone |
( |
UPrimitiveComponent * | OverlappedComponent, |
|
|
AActor * | OtherActor, |
|
|
UPrimitiveComponent * | OtherComp, |
|
|
int32 | OtherBodyIndex ) |
|
protected |
Handles player leaving the inner trigger zone.
Removes players from tracking and notifies listeners when zone is empty
- Parameters
-
| OverlappedComponent | The component that was overlapped |
| OtherActor | The actor that left the zone |
| OtherComp | The component of the leaving actor |
| OtherBodyIndex | Body index of the collision |
◆ OnActorExitOuterZone()
| void UTriggerZone::OnActorExitOuterZone |
( |
UPrimitiveComponent * | OverlappedComponent, |
|
|
AActor * | OtherActor, |
|
|
UPrimitiveComponent * | OtherComp, |
|
|
int32 | OtherBodyIndex ) |
|
protected |
Handles player leaving the outer trigger zone.
Removes players from tracking and notifies listeners when zone is empty
- Parameters
-
| OverlappedComponent | The component that was overlapped |
| OtherActor | The actor that left the zone |
| OtherComp | The component of the leaving actor |
| OtherBodyIndex | Body index of the collision |
◆ OnRegister()
| void UTriggerZone::OnRegister |
( |
| ) |
|
|
overridevirtual |
Configures zones when component is registered.
Sets zone sizes and visual properties during component initialization
◆ SetTriggerZoneSize()
| void UTriggerZone::SetTriggerZoneSize |
( |
USphereComponent * | ZoneComponent, |
|
|
const float | NewZoneSize ) |
|
protected |
Updates the radius of a trigger zone.
Safely resizes a zone component with validation
- Parameters
-
| ZoneComponent | The sphere component to resize |
| NewZoneSize | The new radius for the zone |
◆ SetupZone()
| void UTriggerZone::SetupZone |
( |
USphereComponent * | ZoneComponent, |
|
|
const float | ZoneSize, |
|
|
const FColor | ZoneColor ) const |
|
protected |
Configures a sphere zone with collision and visual properties.
ZONE MANAGEMENT //////// Setup
Sets up collision profile, visibility, and color for zone visualization
- Parameters
-
| ZoneComponent | The sphere component to configure |
| ZoneSize | The radius size for the zone |
| ZoneColor | The debug color for zone visualization |
◆ InnerZoneSize
| float UTriggerZone::InnerZoneSize |
|
protected |
PROPERTIES //////// Configuration
The documentation for this class was generated from the following files:
- /sources/Source/BCR/Headers/System/Event/TriggerZone.h
- /sources/Source/BCR/Sources/System/Event/TriggerZone.cpp