Links

Interactable

✔

Overview

This component is often used to create interaction with the animals, even though it has no dependencies with the Animal Controller, it can be used as a stand alone component, along with the Interactor script.
The script for the Interactable is MInteract.

Parameters

ID

Index of the Interactable. This value is used by the Interactor as an Event to identify with which interactable is interacting.

Interactor ID

Which Interactors can interact with this Interactable, by default is set to -1 which means this interactable can interact will all interactors.

Auto

If the Interactor has this interactable focused it will apply the Interaction logic automatically, without having to call the Interact() method.

Single Interaction

Interact once. After an interaction is executed with this interactable, this component will be disabled, so it no longer can be used.

Delay

Delay time to execute/call the interaction logic.

Cooldown

Time needed to elapse between interactions. This only works when Single Interaction is set to false

Events

On Interact with (GameObject)

Invoked when the Interactor execute an interaction. The parameter is the Interactor Gameobject

On Interact with (Int)

Invoked when the Interactor execute an interaction. The parameter is the Interactor Index. this is call right after the Event OnInteractWithGo(GameObject).

On Focused

Invoked when the Interactor has this Interactable as the focused Interactable.
​