ULimenConeTraceComponent
Overview
ULimenConeTraceComponent is an actor component designed to trace a cone in the world space, checking for actors within its defined parameters. It updates a delegate when actors enter or exit the cone's volume. The component can be configured with collision channels and cone data, and it provides functionality to add actors to check and ignore during tracing.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| OnConeCollisionUpdate | Public | A delegate that is called when an actor enters or exits the cone's volume. |
| LineTraceCollisionChannel | EditDefaultsOnly | The collision channel used for line tracing. |
| ConeData | Private | Data defining the shape and properties of the cone. |
| ActorsToCheck | Private | A map of actors to check against the cone, with a boolean indicating if they are inside the cone. |
| LineTraceQueryParams | Private | Parameters for line tracing, including ignored actors. |
| IgnoredActors | Private | Actors that should be ignored during line tracing. |
Functions
Return Type | Signature | Description |
|---|---|---|
| BeginPlay() | Initializes the component and sets up initial state. |
| TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) | Ticks the component, performing cone tracing if active. |
| AddLineTraceActorToIgnore(AActor* Actor) | Adds an actor to the list of actors to ignore during line tracing. |
| Adds an actor to check against the cone's volume. | |
| Activate(bool bReset) | Activates or deactivates the component, optionally resetting its state. |
| Deactivate() | Deactivates the component and updates the delegate for all checked actors. |
| SetConeData(const FConeData& InConeData) | Sets the data defining the cone's shape and properties. |
| IsActorInCone(const AActor* Test) | Checks if a given actor is within the cone's volume. |
Usage & Implementation Notes
Threading Constraints: This component operates on the game thread.
Replication Requirements: None.
Memory Lifetime Management: The component manages its own memory for actors to check and ignored actors.
Initialization Dependencies: Depends on
FConeDatabeing set before use.