Interactor Update
Updates an Interactor, evaluates nearby Interactable components, and handles activation input for explicit interactions.
What It Does
- Updates the assigned
Interactor - Evaluates nearby Interactable candidates
- Selects the best valid target
- Resolves optional activation input
- Writes outputs such as the selected Interactable, target, interaction, normal, and distance
- Sends a local event when a new interaction is activated
This is the main FSM entry point into the Interactables system.
| Parameter | Description |
|---|---|
| Interactor | The Interactor to update. |
| Activation Mode | How activation input is resolved: None, Manual, MouseButtonDown, or MouseButton. |
| Interact Pressed | Manual activation input when Activation Mode is Manual. |
| Mouse Button | Mouse button index used by mouse-based activation modes. |
| Interact Activation ID | Optional activation identifier such as Use or AltUse. |
| Can Interact | Output true when the current selection can interact this update. |
| Interactable | Output selected Interactable. |
| Target GameObject | Output selected target GameObject. |
| Interaction | Output interaction name. |
| Activation ID | Output activation ID from the selected Interactable. |
| Normal | Output approach normal. |
| Distance | Output measured interaction distance. |
| Interact Event | Optional local event sent when activation succeeds. |
Example
- Add an Interactor component to the player.
- Run
InteractorUpdateevery frame in the player FSM. - Use
Manualactivation mode if your FSM already reads input. - Store
Can InteractandInteractionif you want prompts or branching logic. - Handle
OnInteracton the Interactable target, or react toInteract Eventin the same FSM.