Overview | Videos | Documentation | Demos | Integrations | API | Support

Doc Home > Traits > Interactable

The Interactable component allows the object to be interacted with. Examples of use include switches or buttons. In order for an interaction to occur, the character that will be interacting with the Interactable object must be within the Interactable’s trigger and be looking at the Interactable object.

The Interactable object specifies which object it can interact with. This object, which implements the IInteractableTarget interface, can be any object that performs an action. Examples include a moving platform, opening door, or turning on a light.

When the Interactable object is interacted with it will register itself for the OnAnimatorInteracted event. This event is executed by the AnimatorMonitor when the interact animation fires the Interacted animation event. It is only when this event is executed that the Interactable will tell the IInteractableTarget to perform its action. At any point during this time the IInteractableTarget may become unavailable for any reason so immediately before the action is performed the Interactable object asks the IInteractableTarget if it can still be interacted with.

Target
The object perform the interaction on. This object must implement the IInteractableTarget interface

Interactor Look Interact Threshold
The amount that the interactor must be looking at the Interactable in order to interact. -1 is completely looking at the target, 1 is looking in the opposite direction

Camera Look Interact Threshold
The amount that the camera must be looking at the Interactable in order to interact. -1 is completely looking at the target, 1 is looking in the opposite direction

Max Horizontal Offset
The maximum x offset that the character can be standing away from the Interactable in order to interact

Interactor Layer
The layer of objects that can perform the interaction


<- Health Pickup
Particle Remover ->