Table of Contents
Introduction to Interactables #
In AAMS, the BP_BaseInteractable serves as the foundational parent actor for all non-AAMS specific interactable actors. This includes a wide range of entities such as doors, movable platforms, teleports, buttons, and newly introduced pickup items. The Base Interactable integrates seamlessly with the AC_Interact_AAMS actor component, facilitating dynamic interactions within the game environment.
Functionality Overview:
- Interaction Initiation: When a player enters the Interaction Collision area of an interactable, the AC_Interact_AAMS component is notified, signaling that an interaction is possible.
- Interaction Execution: Upon the player pressing the interact key, the component executes a trace to identify the interact mesh, triggering the Initiate Interact BPI event in BP_BaseInteractable. This event subsequently activates the Begin Interact event, which is essential for managing interactions across all child actors derived from BP_BaseInteractable.
Setting Up a New Interact Actor #
Steps to Create and Configure:
- Create a Child Actor:
- Derive a new actor from BP_BaseInteractable. Open your newly created child actor.
- Configure Mesh and Collision:
- Assign your interactive object mesh.
- Adjust the InteractionCollision to appropriately fit around your object, ensuring it covers the necessary interaction area.
- Define Interaction Events:
- In the Event Graph, add the Event Begin Interact.
- Utilize this event to define the specific interactions, such as movements or state changes, that occur when the interact key is pressed.
- Adjust Interaction Settings:
- Interaction Action: Describes the action performed (e.g., ‘Open’ for a door).
- Actor Name: Identifies the actor (e.g., ‘Door’, ‘Button’).
- In Volume Interaction: Triggers interaction upon entry into the InteractionCollision if set to true.
- Only Use Once: Disables further interactions after the first use.
- Is Used: Manually indicate if the object has been interacted with, useful for game state management and saves.
- Show Widget: Controls the display of the interaction widget, which can be hidden when In Volume Interaction is active.
- Tags: Define specific actor tags required for initiating the interaction (e.g., ‘Player’).
- Character Animation Integration:
- For detailed instructions on syncing character animations with object interactions, refer to the Interaction Component section of the documentation.