Interaction Interface
Class Reference: BPI_BUIS_InteractionInterface
Last updated
Class Reference: BPI_BUIS_InteractionInterface
Last updated
The default Interactable Actor that comes with this system (BP_BUIS_Interactable
) is set up with this interface already, but if you need or want to create your own interactable then you'll need to add this interface to your Interactable Actor.
Head to your custom interactable class then go into the Class Settings Menu and then in the details panel look under Implemented Interfaces, and add the BPI_BUIS_InteractionInterface
.
You will now have four different functions underneath the Interfaces in the category to the left. The most important ones is the Get Interaction Component and Can Interact.
These are required for any form of interaction to take place.
Get Interaction Component: Allows any entity in the game to easily get access to the interaction component of your Interactable.
Can Interact: Determines whether or not this interactable can be interacted with. This must return true or you won't be able to interact with your interactable.
Highlight Interactable: Allows you to set up any logic you require for highlighting your interactable when its being detected.
Get Interaction Highlight Data: Allows you to set up text data which can then be retrieved by any entity in the game.
First you would need to open the Can Interact interface function and make sure that the return node returns true, or has the possibility or returning true. If this returns false (which it does by default), then it'll always fail to interact with this interactable.
Next you will want to return the Interaction Component in the Get Interaction Component interface function. If this isn't returning anything then the system will also fail to interact with your interactable.
As soon as you've set these up then you'll be able to interact with your own Interactable actors.