ULimenCinematicInteractableComponent
Overview
ULimenCinematicInteractableComponent is a subclass of ULimenInteractableComponent. It manages the interaction logic for cinematic sequences, including attaching subcomponents, handling player input, and managing camera and item transformations. The component also provides delegates for various cinematic events such as start, end, and trigger.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| CinematicCamera | BlueprintReadOnly | Camera used during the cinematic sequence. |
| ItemSocket | BlueprintReadOnly | Socket for attaching items during the cinematic. |
| CinematicCameraOffset | EditAnywhere, BlueprintReadOnly | Offset for the cinematic camera relative to the component. |
| ItemSocketTransform | EditAnywhere, BlueprintReadOnly | Transform for the item socket relative to the component. |
| TransitionParameters | EditAnywhere, BlueprintReadWrite | Parameters for transitioning between views during the cinematic. |
Functions
Return Type | Signature | Description |
|---|---|---|
| AttachSubComponents() | Attaches subcomponents (camera and item socket) to this component. |
| OnComponentCreated() override | Called when the component is created, setting up initial states for the camera and item socket. |
| PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override | Handles property changes in the editor, updating the camera or item socket transform accordingly. |
| AddItem(ALimenGameplayActor* Item) | Adds an item to the cinematic sequence by attaching it to the item socket and teleporting it to the socket's location. |
| SetItemRelativeTransform(const FTransform& NewTransform) | Sets the relative transform of the item socket. |
| Interact(AController* InController, APawn* InPawn) override | Handles interaction logic, setting up player controller and pawn references and broadcasting the cinematic trigger event. |
| NotifyInteract() | Notifies interaction by calling the base class's interact method. |
| StartCinematic(APlayerController* InPlayerController, APawn* InPlayerPawn) | Starts the cinematic sequence, setting up the view target and activating the cinematic camera. |
| StopCinematic() | Stops the cinematic sequence, resetting player controller and pawn references after a delay if necessary. |
| GetCurrentPlayerController() const | Returns the current player controller associated with this component. |
| GetCurrentPawn() const | Returns the current pawn associated with this component. |
| GetItemActor() const | Returns the item actor currently attached to this component. |
| OnCinematicStarted() | Called when the cinematic sequence starts, activating the camera and disabling player input. |
| OnCinematicStopped() | Called when the cinematic sequence stops, deactivating the camera and enabling player input. |
Usage & Implementation Notes
The component uses
FAttachmentTransformRulesto manage how subcomponents are attached to this component.Cinematic events are managed through delegates (
OnCinematicStart,OnCinematicEnd,OnCinematicTriggered).The component handles memory management by using weak pointers for player controller, pawn, and item actor references.