Interaction System - NEW! {{ currentPage ? currentPage.title : "" }}

Creating generic interactions between the player and any object in the world can be achieved with very few steps.

First of all make sure that your player has the ACFInteractionComponent. If not just add it by clicking +Add button in the top left window of your player blueprint. After that you’d need to configure your component:

The interaction is done throught an InteractionArea that can have variable dimension and will check for all the Actors that are in that range (300 cm in the sample) of the provided CollisionChannels. You can add as many collisions channel as you want to be checked by the component.

To make an Actor interactable it needs to implement the ACFInteractableInterface (to implement an interface you’d need to open the selected blueprint, go in ClassSettings -> Implemented Interface -> Add -> ACFInteractableInterface).

Once the interface is implemented you’ll see in the function tab that you can now override all the interface virtual functions, in particular:

OnInteractableRegistered/Unregistered by Pawn:

Called when this interactable enters within the interaction area of a player. A reference to the player is provided as an argument.

CanBeInteracted: Define conditions that needs to be verified to make the interaction happen.

OnInteractedByPawn: Called when a player interacts with this object. Add here all the interaction logic.

GetInteractableName: Used to assign interaction name/messages for UI.

NOTE: At least one of the component of the actor needs to have collisions and needs to be in one of the channels defined above to be detected by the interaction system!

{{{ content }}}