Interactor Component
Add Component > PlayMaker > Interactor
The Interactor component is the actor-side part of the Interactables system.
Add it to the player, character, or other GameObject that should search for nearby Interactables and activate them.
In PlayMaker, the main FSM entry point for using this component is the InteractorUpdate action.
What It Does
The Interactor:
- scans for nearby Interactable colliders
- filters them by layer, tag, distance, and other rules
- chooses the best valid candidate
- keeps track of the current focused Interactable
- sends interaction system events when focus, availability, or activation changes
Typical Setup
- Add the Interactor component to the player or actor.
- Set Reference Transform if interaction checks should start from a child transform such as a camera, hand, or chest socket.
- Set Interactable Layers so the Interactor only scans relevant colliders.
- Set Search Radius to match the interaction distance you want for the actor.
- If needed, set Blocking Layers for line-of-sight checks.
- In the actor FSM, run
InteractorUpdateevery frame. - Use the action's activation settings or pass manual input to trigger explicit interactions.
InteractorUpdate Action
InteractorUpdate is the action that connects an FSM to the interaction system.
It does four main jobs:
- updates the assigned Interactor
- evaluates nearby Interactables and selects the best valid target
- handles optional activation input for explicit interactions
- writes outputs and sends interaction system events
This means that adding an Interactor component by itself is not enough for PlayMaker-driven interactions. Your actor FSM should normally run InteractorUpdate every frame.
Activation Modes
InteractorUpdate can resolve activation in different ways:
Noneupdates targeting only, without sending activation inputManuallets your FSM supply a Boolean press valueMouseButtonDownactivates from a mouse button down eventMouseButtonactivates while a mouse button is held
Use Manual when your project already handles input in FSMs and you want to pass a clean Use, Interact, or AltUse signal into the interaction system.
Outputs
InteractorUpdate can write useful outputs such as:
- whether the current selection can interact this frame
- the selected Interactable
- the resolved target GameObject
- the interaction name
- the activation ID
- the approach normal
- the measured distance
It can also send a local event in the same FSM when a new interaction is activated.
Inspector Reference
| Field | Description |
|---|---|
Reference Transform |
Optional origin for interaction checks. If empty, the Interactor GameObject transform is used. |
Interactable Layers |
Layers that may contain Interactable colliders. |
Blocking Layers |
Layers that can block Require Raycast Hit checks. |
Hit Triggers |
Controls whether overlap checks include trigger colliders. |
Required Tag |
Optional tag filter applied to the Interactable target GameObject. |
Search Radius |
How far the Interactor searches from the reference transform. |
How Target Selection Works
Each update, the Interactor evaluates nearby candidates and keeps the best valid Interactable.
Selection depends on:
- whether the collider resolves to an Interactable
- whether the target matches the required tag
- distance and position rules on the Interactable
- inside-trigger checks
- approach and facing requirements
- raycast-hit requirements
- Interactable priority
If multiple Interactables are valid, the system prefers the strongest valid candidate rather than simply taking the first collider it finds.
Choosing a Reference Transform
The reference transform matters because it defines where distance, overlap, and raycast checks start.
Common choices:
- the player root for simple third-person interactions
- the camera for first-person interactions
- a hand or chest transform for interactions that should start from the character body
If interactions feel too short, too long, or slightly offset, the reference transform is one of the first settings to check.
Example: First-Person Player
For a first-person controller:
- Add an Interactor to the player root.
- Assign the camera as the Reference Transform.
- Set Interactable Layers to the layers used by interactive objects.
- Set a reasonable Search Radius, such as the maximum distance the player should be able to use objects.
- If your Interactables use Require Raycast Hit, make sure Blocking Layers includes level geometry that should block line of sight.
- Run
InteractorUpdateevery frame in the player FSM. - If the interaction requires a Use input, pass that input through
InteractorUpdate, usually withManualactivation mode.
This setup works well for doors, switches, pickups, and terminals where the player is expected to look at the target before using it.
Events and Outputs
The Interactor drives the interaction system events described in the overview:
OnInteractAvailableOnInteractUnavailableOnInteractFocusOnInteractLostFocusOnInteractStartOnInteractOnInteractEnd
These events can carry the selected Interactable, target GameObject, interaction name, activation ID, approach normal, and measured distance.