Getting started

Describes how to use the plugin in your project

Part 1: Enable the plugin

  1. Download the plugin from the Epic Marketplace

  2. Open your project

  3. Go to Edit -> Plugins and enable SimpleFirstPersonInteraction:

Part 2: Pawn

  1. Open your pawn blueprint and click on Add in the Components pane and select Simple First Person Interaction Component:

  2. To make it possible for the player to interact with the object that they are looking at, call TryInteract from an InputAction/InputBinding:

    The component will talk to the item which is currently focused and trigger OnInteract on it. If it is successful, OnItemInteractSuccess will be triggered.

  3. (Optional): You can change the Interaction Distance setting to decide how near the player should be in order to focus on items.

  4. (Optional): You can enable Is Debug Enabled to visualize the Interaction Distance and item interactions.

Part 3: Interactable objects

  1. Open a blueprint which you want to make interactive

  2. Click on Class Settings and under Details -> Interfaces, add InteractableItemItemInterface:

  3. Now you should see the following events in your My Blueprints pane:

  4. Double-click on these events to implement them:

  5. If you start your game, you should now be able to trigger OnFocusStart/OnFocusEnd

Last updated