Limen Framework 0.1 Help

ULimenInteractionComponent

Overview

ULimenInteractionComponent serves as a base class for defining interaction mechanics, including hover and interact events, as well as interaction-specific logic such as handling line of sight and interaction ranges. It is designed to be replicated across the network and supports both client and server interactions.

Properties

Type

Name

Access

Description

TObjectPtr<AController>

Controller

Public

The controller associated with the interaction component.

TObjectPtr<APawn>

Pawn

Public

The pawn associated with the interaction component.

FRepInteractionParams

InteractionParams

Private

Parameters for replication, including controller and pawn.

FRepInteractionUpdateData

InteractionUpdateData

Private

Data used for replication of interaction updates.

bool

bDebugMode

Public

Debug mode flag to enable additional debugging tools or visualizations.

float

InteractionRange

Public

The maximum range within which interactions can occur.

Functions

Return Type

Signature

Description

void

GetLifetimeReplicatedProps(TArray

& OutLifetimeProps) const

Registers properties for replication.

void

OnComponentCreated() override

Called when the component is created.

void

BeginPlay() override

Called when the component begins play.

void

TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override

Called every frame to update interaction logic.

void

SetupInteractionParams(AController* Controller, APawn* Pawn)

Sets up interaction parameters with the given controller and pawn.

float

GetInteractionRange() const

Retrieves the current interaction range.

void

SetInteractionRange(const float NewValue)

Sets a new interaction range.

bool

DebugMode() const

Checks if debug mode is enabled.

virtual void

RestartInteraction()

Virtual function to restart interaction logic.

virtual void

Interact()

Initiates the interaction logic with the current interactable object.

virtual bool

Interact(const AActor* SpecificInteractable)

Attempts to perform an interaction with a specific interactable actor.

virtual bool

Interact(ULimenInteractableComponent* SpecificInteractableComponent)

Attempts to perform an interaction with a specified interactable component.

virtual void

StopInteraction()

Stops the current interaction process.

AController*

GetInteractionController() const

Retrieves the controller associated with the interaction component.

APawn*

GetInteractionPawn() const

Retrieves the pawn associated with the interaction component.

ULimenInteractableComponent*

GetCurrentInteractableComponent() const

Retrieves the current interactable component.

bool

GetOwnerViewPoint(FVector& Start, FVector& End) const

Retrieves the view point start and end vectors for the component's owning actor.

Usage & Implementation Notes

  • Threading Constraints: This component is designed to be used on both client and server threads.

  • Replication Requirements: The InteractionParams and InteractionUpdateData properties are replicated using REPLIFETIME_WITH_PARAMS_FAST.

  • Memory Lifetime Management: The component uses weak pointers (TWeakObjectPtr) for managing the lifetime of interactable components, ensuring that memory is properly managed without causing dangling references.

  • Initialization Dependencies: The component requires a valid owner actor with authority to set up interaction mechanics.

22 May 2026