> For the complete documentation index, see [llms.txt](https://hiveminddocs.gitbook.io/hivemind/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hiveminddocs.gitbook.io/hivemind/code-systems/ultimate-interaction-system-uis/classes/components/player-interaction-manager.md).

# Player Interaction Manager

This should go onto the player character, this component interfaces with the Interaction Component making interaction possible in both singleplayer and multiplayer environments.

## <mark style="color:blue;">Overview</mark>

This component is meant to either be used as is, or be subclassed and overriding a few set of functions to allow for custom functionality.

{% hint style="warning" %}
Note: This doesn't handle the trigger effect, but handles the way that the player interacts with the object.
{% endhint %}

This component comes preconfigured with an instant and timed based interaction.

* Instant: Instantly Interacts with the Actor
* Timed: Interacts with the Actor after a certain amount of time, releasing the before the interaction has triggered will cancel the interaction attempt

{% hint style="warning" %}
Note: You will need to subclass this component and override the `GetTraceLocation` function and set the start trace location as well as the end trace location to make sure that the Sphere and Line trace trace mode types works correctly.
{% endhint %}

<figure><img src="/files/lr0elT1fqSeddaNXxJxv" alt=""><figcaption><p>Example of Get Trace Location for a first person character.</p></figcaption></figure>

## <mark style="color:blue;">Functions</mark>

### <mark style="color:blue;">Overridable Functions</mark>

* <mark style="color:yellow;">Execute Custom Interaction Event</mark>: Override this function to create your own player interaction type.
* <mark style="color:yellow;">Custom Release</mark>: Override this function to create your own release behavior.
* <mark style="color:yellow;">Custom Cancel</mark>: Override this function to create your own custom interaction cancel behavior.
* <mark style="color:yellow;">Custom Trace</mark>: Override this to create your own trace behavior for detecting and interacting with actors.

### <mark style="color:blue;">Callable Functions</mark>

* <mark style="color:yellow;">Do Interact</mark>: Call this function to interact with the currently detected interactable.
* <mark style="color:yellow;">Release Interaction</mark>: Call this function to release the interaction.
* <mark style="color:yellow;">Cancel Interaction</mark>: Call this function to Cancel the interaction.
* <mark style="color:yellow;">Detect Interactable</mark>: Call this function to try and detect an interactable.
* <mark style="color:yellow;">Get Detected Interactable</mark>: Returns the current detected interactable.
* <mark style="color:yellow;">Get Trace Location</mark>: This will return the start and end trace location vectors.
* <mark style="color:yellow;">Set Actors to Ignore</mark>: Sets the actors which should be ignored by the Interactable Detection functions.
* <mark style="color:yellow;">Is Interaction Active</mark>: Returns True if an Interaction Event has been started.
* <mark style="color:yellow;">Is same Interaction Component</mark>: Returns True if the input parameters interaction component is the same as the currently detected one.
* <mark style="color:yellow;">Execute Timed Event</mark>: Will execute a timed interaction event, this will also update the On Event Progress Update every tick. Note that this will trigger the interactable when the timed event finishes.
* <mark style="color:yellow;">Cancel Timed Event</mark>: This will cancel and reset the timed event.
* <mark style="color:yellow;">Reset Timed Event</mark>: Will reset the timed event. Note that this will not cancel the timed event but reset it and stop the timer.

### <mark style="color:blue;">Bindable Events</mark>

Bindable Events lets your character pawn be able to react to the different interaction event.

* <mark style="color:yellow;">On Target Interactable Found</mark>: Executed upon finding an Interactable with Detect Interactable
* <mark style="color:yellow;">On Target Interactable Lost</mark>: Executed when found interactable has been lost.
* <mark style="color:yellow;">On Target interaction Started</mark>: Executed upon starting an interaction.
* <mark style="color:yellow;">On Target Interaction Triggered</mark>: Executed upon triggering an interaction.
* <mark style="color:yellow;">On Target Interaction Cancelled</mark>: Executed upon cancelling an active interaction.
* <mark style="color:yellow;">On Target Interaction Released</mark>: Executed upon releasing an active Interaction.
* <mark style="color:yellow;">On Target Interactable Highlighted</mark>:  Executed Upon finding an Executable.
* <mark style="color:yellow;">On Event Progress Update</mark>: Executed upon through timed events. (By default)
* <mark style="color:yellow;">On Timed Event Started</mark>: Executed upon starting a Timed Event.
* <mark style="color:yellow;">On Timed Event Ended</mark>: Executed Upon Ending/Resetting a Timed Event.

### <mark style="color:blue;">Editable Properties</mark>

#### <mark style="color:blue;">Trace Settings</mark>

* <mark style="color:yellow;">Trace Type</mark>: Set the Trace type to use; Lines Trace, Sphere Trace or Custom Trace.
* <mark style="color:yellow;">Trace Channel</mark>: Object Channel to Trace against.
* <mark style="color:yellow;">Trace Complex</mark>: Determine if you want to use simple collision traces or complex collision traces.
* <mark style="color:yellow;">Sphere Trace Radius</mark>: The Radius of the sphere trace mode.

#### <mark style="color:blue;">Debug Settings</mark>

* <mark style="color:yellow;">Draw Debug Type</mark>: Trace Debug Type
* <mark style="color:yellow;">Trace Color</mark>: The color of the non-hit trace.
* <mark style="color:yellow;">Trace Hit Color</mark>: The color of the hit trace.
* <mark style="color:yellow;">Draw Time</mark>: Draw time of the Trace Debug Draw Type.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hiveminddocs.gitbook.io/hivemind/code-systems/ultimate-interaction-system-uis/classes/components/player-interaction-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
